flat assembler
Message board for the users of flat assembler.
Index
> Windows > SMTP with winsock? |
Author |
|
r22 05 Nov 2006, 20:23
OzzY you just have to research the Winsock api in MSDN.
Here are the functions you'd need. library winsock,'WS2_32.DLL' import winsock,\ WSAStartup,'WSAStartup',\ WSACleanup,'WSACleanup',\ socket,'socket',\ connect,'connect',\ recv,'recv',\ send,'send',\ closesocket,'closesocket' You'd start with WSAStartup then create a socket handle with the 'socket' then you'd use 'connect' to connect to the SMTP server then you'd 'send' your SMTP protocol data. After the connect or the send you may also want to use recv to check the replies from the server. As for sending attachments, if I'm not mistaken the files are 64bit encoded and a different MIME header is used in the email. If you really want to research the topic you can download a packet sniffer like Ethereal and sniff an outlook express (or any other email client) send. This will let you verify the format of the header information in the email and such. I'm sure if you look hard enough on google you may find an example of the SMTP protocol usage (probably written in C or C++). |
|||
05 Nov 2006, 20:23 |
|
LocoDelAssembly 05 Nov 2006, 21:12
It's base64, but it doesn't means 64-bit but a way of using ASCII chars to represents binary values from 0 to 63. Since every byte can go from 0 to 255, you need more than one base64 char to represent a binary byte (and some base64 chars mixes two binary bytes).
Here a link http://en.wikipedia.org/wiki/Base64 |
|||
05 Nov 2006, 21:12 |
|
rugxulo 05 Nov 2006, 22:06
Don't forget decard's base64 lib w/ demo (Win32, I think).
Quote:
|
|||
05 Nov 2006, 22:06 |
|
OzzY 06 Nov 2006, 17:45
Great news: I could send my first mail from C code!!
*Feels like a child learning to say the first words* Soon, I'll try to make a FASM Simple SMTP Client and post in project section!! |
|||
06 Nov 2006, 17:45 |
|
OzzY 07 Nov 2006, 00:49
When I send a message it goes to spam folder. Is there a way to prevent it?
|
|||
07 Nov 2006, 00:49 |
|
UCM 08 Nov 2006, 00:37
It depends. One way is to set "X-Priority: 3" for some Hotmail filters.
|
|||
08 Nov 2006, 00:37 |
|
okasvi 10 Nov 2006, 15:13
I think that you dont use headers (and/or use X-client or w/e) that most mailers use, so it's classified as spam... you should try sending email with ie. outlook and view the headers it fills for normal email...
|
|||
10 Nov 2006, 15:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.