View previous topic :: View next topic |
Author |
Message |
KU5D
Joined: 10 Feb 2008 Posts: 46 Location: Asheville, North Carolina
|
Simple SMTP question: multiple e.mail addresses |
Posted: Thu Dec 10, 2009 2:17 pm |
|
|
Greetings all,
I've just got a webserver up and running on the CCS 3.3v Ethernet Development board and have added e.mail (send only) functionality to it based on the SMTP examples included with the CCS stack (ex16.c). Sorting out the SMTP server address was a bit fun, but at least it's working. Now, I'd like to send alerts to multiple e.mail addresses and have tried the standard semicolon delimiter between them (have tried commas too) to no avail. Is there something simple I'm overlooking? All the target addresses are members of the same domain.
my stuff:
new CCS 3.3v Development Kit
compiler version 4.101 (with the CCS TCP/IP stack)
regards... _________________ Confidence is the feeling you have right before you fully understand the situation... |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Thu Dec 10, 2009 8:31 pm |
|
|
Where did you read to use the ; ??
I thought the convention was to use a comma.
<bkamen@benjammin.net>,<ben@benjammin.net>
(and that's how it should be on the RCPT TO: line to the forwarding mail server.)
Have you tried that?
Maybe I'll go look at the RFC again. :P
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
mbradley
Joined: 11 Jul 2009 Posts: 118 Location: California, USA
|
|
Posted: Fri Dec 11, 2009 12:08 am |
|
|
I am not familiar with the code/project you refer to, but I have written many server services regarding mail...
for mail to more than one recipeint, you need to specify a
RCPT TO: <email@domain.tld>
for each email address, as a seperate line.
Example conversation:
Connected to 127.0.0.1.
Escape character is '^]'.
220 vhost.ontura.com ESMTP Sendmail 8.14.1/8.14.1; Thu, 10 Dec 2009 21:36:50 -0800
helo localhost
250 vhost.ontura.com Hello vhost.ontura.com [127.0.0.1], pleased to meet you
mail from: <me@ontura.com>
250 2.1.0 <me@ontura.com>... Sender ok
rcpt to: mbradley@ontura.com
250 2.1.5 mbradley@ontura.com... Recipient ok
rcpt to: info@ontura.com
250 2.1.5 info@ontura.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: test email
from: "mike" <mbradley@ontura.com>
this is the body of the email
.
250 2.0.0 nBB5ao9A032685 Message accepted for delivery
quit
221 2.0.0 vhost.ontura.com closing connection
Connection closed by foreign host.
[root@vhost mail]# _________________ Michael Bradley
www.mculabs.com
Open Drivers and Projects |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Fri Dec 11, 2009 12:24 am |
|
|
Yep - he's right.
I remember now, I was creating mail files on the fly and if you format in the file the TO: line with multiple recipients, Sendmail takes care of the rest.
If you are talking directly to a mail server, you need to do a RCPT TO: for each destination.
See: http://www.ietf.org/rfc/rfc2821.txt _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
KU5D
Joined: 10 Feb 2008 Posts: 46 Location: Asheville, North Carolina
|
|
Posted: Fri Dec 11, 2009 4:16 pm |
|
|
Excellent. The quick (and correct) answer is much appreciated.
Regards _________________ Confidence is the feeling you have right before you fully understand the situation... |
|
|
|