sending email via sockets
Hello,
I've tryed to send an email with the smtp protocol and sockets. But it isn't working :( Code:
the function returns 0, but I don't receive an email. I use this params: server: my mailserver port: 25 to: [email protected] from: [email protected] subject: 1337 Test text: this is a test mail I've tryed socket_send and socket_send2, but both natives aren't working Regards Greenberet |
try using len += instead of len =
The problem is its sending the length of buffer as just the length of the subject and text so the email doesnt get enought information to send. |
change this:
Code:
MAIL FROMCode:
MAIL FROM: |
ty Kost
i changed it, but it is still not working :( btw. the single dot wasn't missing i had it in the same string as "SUBJECT"^^ Code:
@suicide ty for your help, but "len =" is correct^^ Regards Greenberet |
1. your source seem fine, except ^r^n after QUIT missing..
2. i'm not sure if you can send all the commands once, or if you have to wait for the response from the mail server. i would try to get the responses from the mail server, this would help you to know why this isn't working.. |
Oh, I read through it quick and only saw one socket_send().
|
| All times are GMT -4. The time now is 20:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.