Sending of data to an email .. say like i have a text file that i wanted sent in the mail would it be easier to code something that opens the text file and get the data inside as the body of the email or to send the email as an attachment.. any help would be appreciated
Posted on 2002-02-21 04:20:15 by illwill
Look at the MAPI stuff for an easy way to send email.
Posted on 2002-02-21 08:28:15 by f0dder
where would i go to find the info
Posted on 2002-02-21 18:11:10 by illwill
hi illwill,

pop, imap, mapi and smtp all are email protocols. to understand how email works you will need to read up on these. there really isnt much source code for you to look at concerning these protocols in assembly at least that ive found. bazik is almost completely done with writing a full email app in assembly. wait around for a few weeks and he will probably have his source code out you can take a look at.

for now study up on the protocols by doing a search at google.
Posted on 2002-02-21 20:04:14 by smurf

How are you using this? Do you want the recipient
to be able to immediately view the mail in plain
text, HTML, an attachment, a .jpg ? That will
determine which method and how complicated you
task will be!

Posted on 2002-02-21 20:56:17 by farrier
bascially i want a system monitor to email reports generated in a text file.. so i dont know if it would be easier to attach the file or open up the file ,copy the text inside the file,then make that as the body of the email
Posted on 2002-02-22 00:34:37 by illwill

If I can, I'll post something by noon Friday, that
will do what you want. You'll just had to change
the interface to accomplish what you want. My
program sends an end-of-the-month report as an
attachment with minimal user interaction. This is
for use by employees that barely know how to use a
computer. It is "MAPI free", I never could get
MAPI to work reliably on all computers!

Posted on 2002-02-22 00:44:02 by farrier

Attached is the source and .rc file I yanked out
of my email program. I left only the SMTP stuff
and none of the UI, except the main dialog. I had
to remove most of my stuff because it was very
specific to the current users. But you should get
the idea.

But all you have to do is set the,
To:...line 90
From:...line 87
mail server...line 66
in the .data section to personalize this for your
needs. On line 112 you see the place where the
contents of the attachment will go. You could
either include the data inline or read a file and
send the contents of the file.

Set the above parameters and your recipient should
get an email with an attached file named:
firsttry.bin No encoding is used so the file will
only show up as an attachment, not in line text.

Any questions or contributions to the code are
welcomed after you have studied Iczelion's
excellent winsock tutorial.


Posted on 2002-02-22 13:02:40 by farrier
thanks for the examble i will use it as a start to learning email procedures thanx man
Posted on 2002-02-23 00:50:12 by illwill