Link to home
Start Free TrialLog in
Avatar of jodyglidden
jodyglidden

asked on

cc in an email using smtp control

Hi,
Is there a way to send a message to a someone in the normal way using a smtp control but include the cc header for a particular user without actually cc'ing it to the user.  For example, if someone has already been cc'd and I am just using an smtp control to sending a copy to somebody else, I'd like that new user that I'm sending to.. to still know that a particular user has been cc'd but not re-cc it to them.  If I add the cc header the mail server actually cc's it as it's supposed to of course so I'd like to see if I can add a cc header somehow for looks only.  Thanks.
Avatar of Tyrsis
Tyrsis

In the DATA section of an SMTP mail, you simply add CC: email@example.com to the header section of the DATA part of a mail, where email@example.com is the email of the user that was CC'd.  This will show the email of the user you are CCing without actually ever sending anything to them.  If you set a RCPT TO:<email@example.com> and email@example.com is the person who is being cc'd, then that is when they will receive a copy of the mail (of course that is if the SMTP server allows relaying, which most don't these days).

Tyrsis
Avatar of jodyglidden

ASKER

Hi,
Sorry, I'm not familiar with the DATA section of the headers.  I've worked quite a bit with headers and with message bodies but I lost you on this part.  Would you mind explaining that part a bit further?  Thanks for your help so far.
Oh, I was assuming that the SMTP control or component you were using allowed pretty raw access to the data it is sending to the SMTP server.  An SMTP server works in the following way.  You log into it and send a HELO (or EHLO command).  The server responds.  You send a MAIL FROM:<email> to the server, another response, RCPT TO:<email>, response, and if all goes well you send a DATA command, then you start sending the body of the email followed by a period (.), which terminates the "body" of the email basically.  But in that body is where the headers sit (ie: Subject, Date, From, CC and some other lines that an email client uses).  Anyway, what I suggest is, if there is some sort of header variable that can be added to, try adding a CC: email@example.com to it.  If it is actually SENDING to that CC then you have a problem, and it sounds as though the control is trying to do something you don't want it to do.  
ASKER CERTIFIED SOLUTION
Avatar of Tyrsis
Tyrsis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial