Sending email in VC++ 6.0
-
naeemnimi wrote:
Can somebody would tell me how to send email in C++ using smtp.
here is an example :- http://www.codeproject.com/internet/csmtpconn.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
This coding example looks good: http://codeguru.earthweb.com/Cpp/I-N/network/messaging/article.php/c5417[^] SkyWalker
-
naeemnimi wrote:
Can somebody would tell me how to send email in C++ using smtp.
here is an example :- http://www.codeproject.com/internet/csmtpconn.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
http://www.codeproject.com/internet/csmtpconn.asp\[^\] The method that the above site provides may be useful to send e_mail on the old smtp protocol servers. This kind of servers dont need the user name and password when they are connected to send e_mail. But now most of the e_mail servers update e-mail system for security and against rubbish e-mails.They ask users to provide user names and passwords to be connected. to send mail,you should follow: 1、use socket to connect to the smtp server . 2、send "ehlo the smtp server \r\n" to the smtp server . you will receive the "250" from the smtp server,which stands for ok. 3、send "auth login \r\n" .then will receive the "334" from the smtp server. 4、send "your user name\r\n" which is encoded by the base64 arithmetic. you will receive the "334" . 5、send "your password"which encoded by the base64 arithmetic. you will receive the "235" that stands for ok. 6、so much to write.then follow the above site to continue. libo
-
http://www.codeproject.com/internet/csmtpconn.asp\[^\] The method that the above site provides may be useful to send e_mail on the old smtp protocol servers. This kind of servers dont need the user name and password when they are connected to send e_mail. But now most of the e_mail servers update e-mail system for security and against rubbish e-mails.They ask users to provide user names and passwords to be connected. to send mail,you should follow: 1、use socket to connect to the smtp server . 2、send "ehlo the smtp server \r\n" to the smtp server . you will receive the "250" from the smtp server,which stands for ok. 3、send "auth login \r\n" .then will receive the "334" from the smtp server. 4、send "your user name\r\n" which is encoded by the base64 arithmetic. you will receive the "334" . 5、send "your password"which encoded by the base64 arithmetic. you will receive the "235" that stands for ok. 6、so much to write.then follow the above site to continue. libo
Intertherain wrote:
This kind of servers dont need the user name and password when they are connected to send e_mail. But now most of the e_mail servers update e-mail system for security and against rubbish e-mails.They ask users to provide user names and passwords to be connected.
You may Be right.. But I have you this class to send mail to Yahoo and Gmail... I believe two most popular email service of world (if i am not wrong)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV