Update SMTP class part II
I've previously sent a article about Wes Clyburn's SMTP class.
But I forgot to place the files TextPlain.cpp and TextPlain.h.
Also, some people asked for a demo, so here you are.
The demo project is very easy to look. Go directly to the
function - void CEMailDlg::OnButtonSend() - to see everything
needed to understand how the class work. The project have been
built with Windows NT 4.0 with sp3 and VC6.0. Even if you don't
have this version it should also work. I've also added a makefile
with everything needed to start a new project for those who don't
have the Visual C++ 6.0.
The demo's code have been done really rapidly, I do not intent
that's good programmation ;-)

Comments
some file attachements work, some do not ...
Posted by qadddd on 11/14/2005 07:45amHello, Thanks for these classes very usefull for me. But I have 3 problems : - more and more we have to give a user and password to log on smtp server, how can it be handled in these classes - mails arriving in my mailbax do not display date and time ? something missing in smtp exchange to handle this ? - my biggest problem : I send a mail with a files attached. But depending the file I attached, mail arriving in my mailbox still have the file or do not have it anymore. I follow the code till the send of body part, file is MIME encoded and sent but I don't retrieve it in the mailbox. It doesn't appear to be a random problem because when I use file "a.txt" it always works, and when I use file "b.txt" it always misses ... I try to simplify the maximum "b.txt" (it contains a simple line of usual characters) but I never succeed in retrieving it in the mail received in mail box. The mail itself is always present, only the file is missing . Any suggestion for debugging or solution will be appreciated Brgds DD
ReplyEmbedded types other than TEXT_PLAIN
Posted by Legacy on 09/30/2002 12:00amOriginally posted by: Robert Dunn
These classes are excellent and I have enjoyed learning form these examples however, I cannot seem to get my own agent to work in the way that I want. I can use the existing classes to attach an rtf document to an email but what I really want is to embed enriched text directly into the e-mail message body.
ReplyTo that end I wrote an agent for TEXT_ENRICHED, defined that eMIMETypeCode, and kind of jammed together the AddMIMEPart member functions of CAppOctetStream and CTextPlain to get CTextEnriched::AddMIMEPart which handles encoding. Is this on the right track? No matter what I do the .rtf shows up as an attachment and never is expanded into the message body as desired.
Anyone have constructive comments?
How to use CBase64
Posted by Legacy on 04/08/2002 12:00amOriginally posted by: Maya
I successfully used CBase64::Encode to convert binary data to base64.
But now I need the opposite toconvert base64 to binary.
Is it possible this to be done with CBase64::Decode
and how???
Any examples?????
Thanks
Maya
Replywhile did i always get "553 host deny relay" message!!!!!!!!!!!!
Posted by Legacy on 01/07/2002 12:00amOriginally posted by: zhangguoping
during sending mail, i always got this message.
Replyonly one email address is ok, others all got this
message. why!!!!!!!!!!!!!
Using this source on PocketPC
Posted by Legacy on 12/12/2001 12:00amOriginally posted by: Assaf
I try using this code (with several changes, mostly because of the unicode) on PocketPC, and encounter a problem with the Receive() from the socket after the HELO is sent.
The Send() ends well (I check its return value in order to be sure), but then the Receive() gets stuck, and the application hangs.
Did it happen to anyone on PC ? does anyone have any idea how to solve it ?
ReplyProblems with the "From" tag
Posted by Legacy on 12/02/2001 12:00amOriginally posted by: Birgit Ruhe
I want to use this class to send mails to a domain registration robot. Therefore i have to fill the from field with a string like "userID"<customer@sample.com>. If I try so, I always get the following error: "503:Server not ready for data". What do I do wrong?
ReplyForget to Unlock the critical section
Posted by Legacy on 07/09/2001 12:00amOriginally posted by: Mustafa Demirhan
Hello,
You call m_csAccess.Lock(); but you never call m_csAccess.Unlock();
This fails in a multi-threaded application
ReplyWhat about receiving mails??
Posted by Legacy on 01/25/2001 12:00amOriginally posted by: Paras Shah
Hi there,
I use ur demo for seinding mails and it works nice. But i want to receive the mails in the same manner. Is there any way to do it? if u have some demo or source than pls send me.
thanks in advance.
Replyparas
small bug
Posted by Legacy on 11/09/2000 12:00amOriginally posted by: Anton
ReplyI found a solution to solve the problems with some SMTP servers !!
Posted by Legacy on 09/30/2000 12:00amOriginally posted by: MiniCooler
See at http://codeguru.earthweb.com/internet/SMTP_POP3.shtml
ReplyLoading, Please Wait ...