flat assembler
Message board for the users of flat assembler.

Index > Windows > Send an e-mail with FASM

Author
Thread Post new topic Reply to topic
Hp



Joined: 03 Jul 2004
Posts: 16
Hp 20 May 2007, 18:03
Hello,

is it possible to send a simple text e-mail with assembler?
Where can I learn about this?
Post 20 May 2007, 18:03
View user's profile Send private message Reply with quote
slacker116



Joined: 18 May 2007
Posts: 12
slacker116 20 May 2007, 20:40
Yes, use winsock and connect to port 25 of a smtp server such as mx1.hotmail.com, d.mx.mail.yahoo.com, to find another smtp server use http://dnsstuff.com
type in host email provider URL and select the 'MX' record. after you are connected you use the SMTP(simple mail transfer protocol) to transfer your mail
here are some links:

http://www.windowsnetworking.com/articles_tutorials/Understanding-SMTP-Protocol.html

http://cr.yp.to/smtp.html

Google 'smtp protocol' for more info
Post 20 May 2007, 20:40
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 20 May 2007, 20:54
There is no need for dnsstuff, using http://msdn2.microsoft.com/en-us/library/ms682016.aspx with wType DNS_TYPE_MX ($000F) should work.

http://msdn2.microsoft.com/en-us/library/ms682085.aspx <- Complete reference
Post 20 May 2007, 20:54
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 20 May 2007, 21:28
Hp,

Look at:

http://www.masm32.com/board/index.php?topic=6578.0

MASM code, and also shows sending an attachment, but this is a simple way to send mail; if MAPI is available on your machine.

hth,

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 20 May 2007, 21:28
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 21 May 2007, 05:25
Attached is a quick example using MAPI. It sends a small message and sends the asm source file as an attachment. Works on my XP Pro SP2. I know it should be able to send without any user interaction, but ever time I ran it, my default email client--Thunderbird--popped up with all the correct information. I simply had to click on send. I'll try to see if I can eliminate this.

farrier


Description:
Download
Filename: MAPISendMail.zip
Filesize: 1.9 KB
Downloaded: 297 Time(s)


_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 21 May 2007, 05:25
View user's profile Send private message Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 23 May 2007, 12:02
in russian:
http://www.wasm.ru/article.php?article=simplesmtp

but there is an example(link to example) in fasm.
Post 23 May 2007, 12:02
View user's profile Send private message Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 13 Feb 2008, 04:11
I can't get this to work.
Does anyone have a working Winsock/SMTP or MAPI example?
I can get Winsock/SMTP to work, but not with attached files.

Please give me examples.
I want to make a light-weight email client. Razz
Post 13 Feb 2008, 04:11
View user's profile Send private message Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox 13 Feb 2008, 14:06
Quote:
is it possible to send a simple text e-mail with assembler?

assembler is a language, not a platform. You cant do that.
But you can use assembler to execute system functions (mostly ws2_32.dll in win) wich will connect smtp server and speak to it (how? read smtp rfc or wireshark mails sending from ur smtp client).
Post 13 Feb 2008, 14:06
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.