Link to home
Start Free TrialLog in
Avatar of eversoslightly
eversoslightly

asked on

Email - Sending/Recieving With Pop3 & SMTP

Hi,
I need to know how to send and recieve email from a POP3 or SMTP server, without using MAPI.  If you can find a freeware control for me that would do this (with good documentation), that would be fine.  If you can't find a control, please explain how I can send and recieve mail.  It would be helpful also if you explained how to parse the headers - subject, date, from, to, etc.
Thanks!
-Mark
Avatar of eversoslightly
eversoslightly

ASKER

Please use detail in your answer - it is worth 150 points!
I forgot to add this initially - I use VB5 Enterprise Edition.
I now have found one:
(http://www.kiosknet.org/vb/files/samples/16/pop_smtp.zip)
But I found that it did not allow attachments, or files over 64k.  Attachments are a must for me.
Hi, for sending mail I use AspMail. It is a small control that was designed to be used on IIS Active Server Pages, but it also works with VB on any standard computer. A computer with automatic internet connection can send email without using MAPI and without disturbing the user. This OCX can not find the MX host for the recipients domain! But I use another SMTP server (there are many that still do it) for relaying the emails.
If you do not like to do so, you can also buy AspMX to find MX host names.
ASPmail works reliable and easy, like : MyMailserver.FromName ="Klaus"   MyMailserver.Subject = "Testmessage"....
Well, it is quite expensive, about $45 per single license. Their web-site is www.serverobjects.com
When you look around on their web pages (links to other ASP sites), you will also find other free SMTP objects. But I have no experien
Hi, I just rerad you next message: ASP mail can send attachments (UUENCODE or MIME) -Klaus
Both of those are not freeware - there must be documentation or a control for free somewhere on this subject - it is a quite broad concept - Thanks anyway.
SMTP: Then have a look at
'OCX Mail/ASP by Flicks (FREE)
SMTP mail including attachments.
available at http://www.flicks.com/ASPMail/'
or other sources as seen on page
http://www.activeserverpages.com/components/freemail.asp.

The WINSOCK control is part of VB (= free)



I just found another free one, yet still, without attachments:
http://getit.at/freeocxsite/
Now the question is, how do I get mail (pop), with attachments?
If you can tell me how to do this with the Winsock control, that would be great too.
For now, to leave the board open, I'm rejecting the answer.  If someone else gives me the rest of the answer, I will still give you points for the help you've given me so far.
When you contact the POP3 server with the WINSOCK control on port 110 and enter RETR [mess.no.]
You will not only receive text, but always also with any attachments. They are part of the message and appear as hundreds of letters (text encoded).
You can find that part of the message from VB (where the encoded binary data begins), when you look for the adequate keywords in the message.
You need to decode these letters to binary data. (I remember DOS ZIP had an option to do such things)
Hello; my first message was truncated. This is my experience with receiving mail with the WINSOCK control of VB: Set it to remote port 110. Connect to the POP3 server and wait for the answer of the remote.
If the first sing is a '+', then you are connected. Then you send the POP3 commands (user Klaus[ENTER]...)(Get the RFC document to find all the POP3 commands). Every time you receive a '+' as the first sign, the command has been executed from the POP3 server.
It has been quite easy to connect and log in. But I had much
trouble with converting: Some (many!) messages are not plain ASCII text,but ISO (get another RFC document) or HTML. You need to take care for the conversion so the received email will look fine ! If it is for another/private purpose, you will not need to care much for that.
The winsock control can also connect to the SMTP port of a server and send messages !
Just out of morbin curiosity, why are you opposed to using the MAPI?  Thanks...

Terrence
ASKER CERTIFIED SOLUTION
Avatar of inthrall
inthrall

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial