Three emails sent with one record each

Hi all there are three records that result from the query but instead of sending all three results in the email it sends three emails with one record each. I can't use cfoutput in the cfmail tag. What do I do? Thanks 
<cfquery name="qNames" datasource="salesdb">
select * from company, industries, division
where Date(company.meeting) = '#DateFormat(Now(),"yyyy-mm-dd")#'
and company.SECTORS1 = industries.SECTORSIDS
and division.DEPARTMENTIDS = company.DEPARTMENT1
ORDER BY company</cfquery>
<cfmail to="[email protected]"
from=[email protected]
subject="Today's email"
type="text"
query="qNames">
Dear Fred
#company#
#sectorsnom#
</cfmail>

Hi
Just add Cfoutput to output the value of the query in Cfmail tags Like shown below.
<cfquery name="qNames" datasource="salesdb">
select * from company, industries, division
where Date(company.meeting) = '#DateFormat(Now(),"yyyy-mm-dd")#'
and company.SECTORS1 = industries.SECTORSIDS
and division.DEPARTMENTIDS = company.DEPARTMENT1
ORDER BY company</cfquery>
<cfmail to="[email protected]"
from=[email protected]
subject="Today's email"
type="text"
query="qNames">
Dear Fred
<cfoutput>
#company#
#sectorsnom#
</cfoutput>
</cfmail>
You can also use cfloop before the cftag and get the data stored using <cfsavecontent >. Inside Cfmail you can output cfsavecontent value
Please let me know if this post could help
Regards
Sreekar

Similar Messages

  • I have 2PCs with T/B can I get emails sent to one on the other temp measure.

    I have two computers using thunderbird for emails, as I intend updating the one of them that I get my main emails sent to I was wondering if when I have it offline would it be possible to get my emails using the other computer ( it is a Ubuntu computer.)

    Are you using IMAP or POP? See https://support.mozilla.org/en-US/kb/glossary-terms-including-types-accounts
    If you are using IMAP, you can access email from either computer and it will still be available on the other.
    If you are using POP, you can specify to leave messages on the server. Otherwise, when you read a message on one, it will not be available on the other.

  • Multiple email address with one server account

    Why can't Mail have multiple email addresses on one email account? Like Thunderbird calls them Identities. As I remember, Outlook also supports this. I like Mail but it seems rather dated and clunky in this respect.
    I am using mainly IMAP so maybe I should switch to Thunderbird but I do still have some old messages in pop accounts in Mail.

    You can have multiple accounts, but only one "identity." Configure new mail accounts for all the different email addresses you may have. They can each have different configurations, different servers, etc. as well as be individually made active or inactive. All incoming mail will funnel into a single Inbox, but you can use rules to transfer incoming mail to separate mailboxes based on the account.
    What you cannot have are distinct "personalities."
    Bear in mind that Mail is intended for a single user and the vast number of single users only have one email account. I actually have four different email addresses but three of them are set to forward mail to the account I use with Mail. Mail works quite well with IMAP, POP, and Outlook mail accounts.

  • Email sent with attachments not showing in sent folder

    I have recently found that emails I send with an attachment do not show up in my sent folder. They are arriving at recipient but I do not then have a record of the email sent.  This is really very annoying and I can see a few other poplin online forums are having the same problem.  However nobody seems to have come up with a solution.  It appears I have to cc myself in to the mail and then move it to my sent folder when it arrives. I can't keep doing this.  Other emails without attachments are showing in the sent box.  Does anyone have any idea what I can do to fix this please.

    Didn't work for me... (rebuilding the mailbox)
    I cleaned the Sent mailbox and rebuilt the culprit mailbox and the general "Sent" mailbox.... sent a message.. it 'hung' in the Outgoing Message box for @ 20 seconds and it sounded as if it were sent and when checking the Sent mailbox for that account, it did not show.... I tested this again with another message addressed to myself and it sent as expected and showed in the Sent mailbox for the account... Did another test to a different recipient and the message sent as expected and showed in the Sent mailbox... The only corrollary that exists at this stage, is the recipient of the "disappearing" messages is that I email this particular recipient very regularly and at times with long threads... However, these last messages were completely different subjects and previous replies to this persons email sent as expected.... so this is a random occurrence.
    --prd54usa

  • Why email sent with Mail lands in google spam?

    Dear All.
    I have set up Mail and i am using this for my business mails etc. with Strato imap accounts.
    I noticed that the emails i sent with Mail to a gmail.com email address, arrive automaticly in the gmails spam box. Which ****** my custommers off.
    I have a gmail account myself and tested it. And indeed every email goes in spam. I switched my signature off as it contanes a link to an image, but that didn't make any difference either. Even with a few words in the email and a subject they still land in the spambox.
    Does anybody know where the problem lays?
    Thanks very much in advance.

    So, what are these strato accounts?
    What is the part after the @ sign?
    To see if it's your provider, What's my ip...
    http://www.whatismyipaddress.com/
    Start with these three, check SpamCop or SpamHaus to see if your IP is there...
    http://spamcop.net/bl.shtml
    http://www.spamhaus.org/lookup.lasso
    http://www.spamhaus.org/zen/
    Sometimes an ISP will bloc a whole other ISP too, if it's the source of too much SPAM.

  • How can I track all email sent from one particular user through powershell?

    Went online and found a few commands like:
    Get-MessageTrackingLog -Server servername -Start "11/17/2014 09:00:00" -End "11/17/2014 17:00:00" -Sender "user@domain"
    Got back:
    Get-MessageTrackingLog : The term 'Get-MessageTrackingLog' is not recognized as the name of a cmdlet, function, script
    file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
    and try again.
    At line:1 char:1
    + Get-MessageTrackingLog -Server Mail2013 -Start "11/17/2014 09:00:00" -End "11/17 ...
    + ~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Get-MessageTrackingLog:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    ALL I WANT TO DO IS TO TRACK EMAIL SENT FROM A PARTICULAR USER: Delivery reports in the EAC came up with absolutely nothing after entering the user mailbox and user
    Any help would be appreciated - RJM

    try this :
    get-messagetrackinglog -Server mail01 –resultsize unlimited
     -Start "11/17/2014 09:00:00" -End "11/17/2014 17:00:00" -Sender "user@domain"| Select-Object eventid,sender,timestamp,@{Name="Recipients";Expression={$_.recipients}},@{Name="RecipientStatus";Expression={$_.recipientstatus}},messagesubject
    | Export-CSV c;\tracking.csv
    Then import file to excel
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

  • When replying to email sent to one account, another account is used as the "from"

    Currently using TB v31.3.0 on OS X 10.8.5 (Mountain Lion)
    I have several mail accounts that I send and receive mail from, but lets just deal with the two main ones.
    Account#1 is my default private account - POP and SMTP. Lets say I am [email protected] at this account.
    Account#2 is a business office365 account. Lets say I am [email protected] at this account.
    Prior to a recent update (v31.2.0 I think), if a message was received via mail account #2, if I clicked reply, the message would be sent via the office365 account, irrespective of whether I was a named recipient of the mail or whether the mail arrived via one of the internal mailing lists.
    Since the update if a message is received via mail account #2, if I click reply, the message is sent via the Account#1 SMTP server UNLESS MY NAME is explicitly mentioned in the "to" field.
    In other words, if someone sends an email to [email protected] and I click reply, the mail is sent via account2.com - and all is well. BUT if someone sends an email to [email protected] (and so I end up with a copy in my account2.com inbox) and I click reply, the mail is sent via account21com - the WRONG account.
    How do I restore the original behaviour without changing my default account?

    Try Mail/Preferences/Accounts /Account Information. Select an account, then go to Outgoing Mail Server (SMTP). From the drop down menu select Edit SMPT server list. Then set up a server for each mail account so that is associated with the e-mail address. Then go to each account and set that server as the Outgoing Mail Server (SMPT). You can click Use only this server if desired.

  • How can I change the sender details on emails sent from one of 2 iphones linked to my itunes?

    I have 2 iphones set up on my itunes, one for me and one for my husband, when he sends an email from his iphone it shows as being sent by me not him. His hotmail email is set as the default on settings and it is his emails in the inbox,how can I change this?

    Use Settings > iCloud. Choose Sign Out at the bottom and then Sign In with your iCloud ID.

  • Apple mail sent with one account but sends with a different account

    I have 5 email accounts in Apple mail.  I have what I call my main one and many times when I take care to send FROM that one, it will land in the recipient's mailbox sent by a different account.  I have tested it different ways even going so far as BCC myself, checking to make sure it is sent out with correct one and it still ends up sending it with the secondary/wrong account.  Any ideas?  I cannot delete the secondary account as I sometimes need to use it for work.  thank you in advance. 

    I have mine set to 993... but I did not set it... all i did was set up gmail, and it worked automaticlly. That might have been the port number in Lion... i dont know.

  • Mail App Doesn't Keep Copies of Email Sent via One Particular Account?

    I have several accounts set up in Mail app.  For one account, I can send and receive email, but copies of the email do not appear in my Sent folder, or in any other folder in Mail app. It is as if they were never sent. All other accounts are functionning normally.
    How can I correct this?

    All four of our iPhone pilot users have experienced this problem at some time. From what I've been able to determine so far:
    + It seems to happen when there's a slightly shaky data connection - we've never seen it on a WiFi connection, or where the phone is stationary with good signal. It frequently happens to me when I'm sending mails on a moving train.
    + Once a message has come back with the "Failed to send" error, the iPhone will keep retrying, but will invariably fail even if it's got perfect GPRS/EDGE/3G signal. The thing is, even though you've been told there was an error, the message has actually been sent already - but it sticks in the Outbox and keeps trying as though it hasn't. It's not until the phone either docks or gets back onto a WiFi network that the message sends one more time and the problem clears.
    + It feels like a problem in the processing of the ActiveSync "OK" acknowledgement during sending - something gets out of line in the iPhone, maybe it misses the ACK because of poor data signal, but then it's stuck.
    + There's no obvious connection to firmware version. We've seen this on everything from 2.0 up to 2.1.
    This is a real problem - and it's absolutely stopping us from letting any "real" users use iPhones through Exchange. Does anyone else have any ideas or suggestions?
    Apple? Any new firmware forthcoming to fix this bug?
    Thanks.

  • Emails sent with Mail show as double for Windows users

    I just restored my computer, and trying to go back to Mail instead of the bloated Outlook. However, I am having the same problem as before:
    every time i send an email, the recipient always sees a single message with double the content. This means he receives 1 email, but the content (body of email) appears twice.
    It looks like the email shows the HTML version first, and then you scroll down and see the PlainText version at bottom. This ONLY happens on my emails being sent to Windows users.
    While it might not be bad for a single message or two, when we have long email chains it results in really really long email chains getting doubled and doubled. Its ridiculous.
    Can anyone suggest a solution to this so that I can go back to using speedy Mail?

    wow...well...ummm....sometimes people need more then plain text for business emails?
    while that is a "solution" its not a viable option.
    i need a solution that allows me to send html email so that windows users can view like a normal email, and not double content.

  • Mail: Why do some emails, sent with attachments, not appear in the Sent category

    Occasionally I will send an email to four different addressees.  The email contains an attachment in pages format, word format and pdf formal.  Though it is sent and though it is received by at least one of those  to whom it is addressed, it does not appear as sent, in the Sent Mailbox.  Why is this and what can be done to get all sent emails to appear as Sent?
    Thank you.
    Otto

    Most mail servers can be accessed in a web browser as well as in Mail. For iCloud, you go here:
    iCloud Mail
    Check for sent messages.

  • I need to retract  an email sent with many errors please on my Apple MAC OS X 10.6.8  asap!!

    I need to retract a message sent to my child's English teacher with many errors in it. I also need to change function to ensure emails are spell checked before being sent out? Thank you so much! I need this information as soon as possible! PLEASE!!
    Thank you in advance.
    jill

    I'm connected to wifi.
    And I have no firewall.

  • Why some emails sent with OS X Mail is not delivered, and if I send the same e mail from the website of my hosting provider, to the same recipients, they are delivered?

    Sometime, when I send an email with my Mac Book Pro, i receive the message:
    Hi. This is the qmail-send program at smtplqs01.aruba.it.
    I'm afraid I wasn't able to deliver your message to the following addresses.
    This is a permanent error; I've given up. Sorry it didn't work out.
    But if I try to send the same messagge, at the same email address, from the web site of my hosting providere, ther are not problem...
    Someone can help me?
    Thanks!!!

    Could be a number of things, among them the fact that the recipient's inbox is full, or his/her ISP email server is a bit slow at hand-shaking with yours, and this of course can vary depending on the fact that the recipient's account is IMAP or POP.
    When you send an email from a webmail, the grunt work is done by the SMTP server, and it's up to it to manage the multiple requests, their number, their frequency, their routing, etc... When you send an email from your Mail app, it'll send it once to your SMTP server, who'll process it a certain number of times before giving up, but you'll receive only one failure message.
    If the recipient's an Microsoft Exchange account, you must know that those servers sometimes send and receive email in bulk, and at a variable refresh rate, hence the "Sorry, your email couldn't be distributed...".

  • Why does email sent from one Thunderbird inbox end up in another's sent file

    My husband and I each have Thunderbird emails. Occasionally, when he sends a message out of his inbox, it ends up in my "sent" file, and labeled from me. But, when there is a reply from the recipient (or a bounce back), it comes into his inbox. So, why is the original ending up in the wrong sent file?

    Check your settings in ''account settings / copies & folders'' where '''sent''' should be saved.

Maybe you are looking for

  • Operation level not getting auto approved

    Hi , Can anyone help me to make operation level request auto completed in oim 11g R2

  • To fetch property phy. n chemical properties details as entered in cg02 in program

    Hello all, I have a requirement regarding the WWI msds report data sheets. I need to pick the value for pH entered for the property physical and chemical properties while creating report sheet in cg02 and use it in a program. Can anyone please tell m

  • AE 10.0.1 Install Fails, 'Update is not applicable'

    I've been trying to update to the new version of After Effects 10.0.1 but the install fails and I get the error message "Update is not applicable." I need this update because I've run into the AIFF rendering bug where an AIFF audio track will not ren

  • Installed Windows 7 on HP Pavilion 23 AIO - Wireless not working

    Hi, I installed windows 7 to replace the pre-installed windows 8 on my hp pavilion 23 aio PC and the network drivers came off. I managed to get the lan to work by getting Realtek RTL811F drivers downloaded and installed from usb, but the wireless is

  • Display Total in ALV-List-urgent

    Hi,     I have an ALV-List with an amount column...I have to show the total at the end of the list..Calculation of total can be done in the internal table but how to display it neatly just below the itab-amount with a tag Total : 29000000 .Kindly hel