Link to home
Start Free TrialLog in
Avatar of bukko
bukko

asked on

SMTP

Does anyone know of a good "Coding with SMTP" tutorial on the net?

Regards

bukko
Avatar of PlanetCpp
PlanetCpp

if you want to know how to send a simple email it's easy
i forgot how to send attachmets, you have to code the attachment in base-64 then theres more commands and things to specify. for simple email
HELO whoiam.net
....wait for response code 250
MAIL FROM:myname@mydomain.com
....wait for response code 250
RCPT TO:recipient@thierdomain.com
....wait for response code 250
DATA
..wait for 354 code, it will tell you to write data then end with a '.' on a single line
Date: 3 Mar 03 1:54:00
Subject: this is the subject

blah blah blah
blah blah
blah blah
.
..wait for 250
QUIT

that's all but make sure your name in mail from really belongs to that server, most servers do not allow redirection cause that allows fake email
youll get a code saying it wont allow it after rcpt to:
Avatar of bukko

ASKER


What I really want to do is retrieve mail from a POP3 server with code.
(I have a mad ambition to see if this can be done with intrinsic ASP code; most things can!)

Plus, how do I send the above; to a specific place? via an ARP type signal?

Thanks

bukko

ASKER CERTIFIED SOLUTION
Avatar of d_iego
d_iego

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
Avatar of bukko

ASKER


That's great info so far.
Do you know of a way of invoking Telnet from ASP so I can contact the server?
Is there a function within CDONTS or similar which will allow me to do this?

Thanks

bukko
Avatar of bukko

ASKER


Actually, I have decided to accept your comment as an answer because you've given me what I really need to know.
I've been able to manually contact my mailserver and 'retrieve' data, so that's got that part sussed.
I'll ask the Telnet question in the ASP section and throw loads of points at it - maybe some bright spark will be able to help!

Thanks to all for your help,

bukko