CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    9

    How to Send Email with attachement using SMTP

    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

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: How to Send Email with attachement using SMTP

    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
    Last edited by hoxsiew; February 26th, 2010 at 08:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured