CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Simple SMTP question: multiple e.mail addresses

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
KU5D



Joined: 10 Feb 2008
Posts: 46
Location: Asheville, North Carolina

View user's profile Send private message

Simple SMTP question: multiple e.mail addresses
PostPosted: Thu Dec 10, 2009 2:17 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Dec 10, 2009 8:31 pm     Reply with quote

Where did you read to use the ; ??

I thought the convention was to use a comma.

<[email protected]>,<[email protected]>

(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

View user's profile Send private message Visit poster's website

PostPosted: Fri Dec 11, 2009 12:08 am     Reply with quote

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 protected]>
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: <[email protected]>
250 2.1.0 <[email protected]>... Sender ok
rcpt to: [email protected]
250 2.1.5 [email protected]... Recipient ok
rcpt to: [email protected]
250 2.1.5 [email protected]... Recipient ok
data
354 Enter mail, end with "." on a line by itself
subject: test email
from: "mike" <[email protected]>

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

View user's profile Send private message

PostPosted: Fri Dec 11, 2009 12:24 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Dec 11, 2009 4:16 pm     Reply with quote

Excellent. The quick (and correct) answer is much appreciated.

Regards
_________________
Confidence is the feeling you have right before you fully understand the situation...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group