Click to See Complete Forum and Search --> : How to Send Email with attachement using SMTP


sameen_f
February 26th, 2010, 12:14 AM
hi,

i have been trying to figure out a way to send email with attachment in mfc\vc++ using smtp...
i have tried "FastSmtp" wrapper and CSMTPConnection wrapper...but i have not been able to send a simple email even after the connection has established.

In FastSmtp i m getting the response error: 530 authentication required

In CSMTPConnection i m getting the same response error : 530 5.7.0 Must issue a STARTTLS command first

i m using a my local server as well as i have tested it with gmail server..but didn't succeed. :(

what should i do?? how can i send a simple email using smtp.

Regards,
Sameen

hoxsiew
February 26th, 2010, 07:27 AM
That's a server response. The SMTP server obviously requires authentication (most do these days to reduce spam). You'll have to do a little more work. See RFC2554:

http://www.faqs.org/rfcs/rfc2554.html

It also apparently requires TLS:

http://www.faqs.org/rfcs/rfc2487.html