| View previous topic :: View next topic |
| Author |
Message |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Wed Jan 16, 2008 8:56 am Post subject: [Question] Sendin email |
|
|
I need to send email messages in my application, and I've googled it for hours but still couldn't find how.. The problem that every code that I find is for sending mail via Outlook. I read that I need a SMTP host, but I don't know where to find one. I'll really appreciate help or some code example.
BTW, It's not for keylogger or something like that, I just need it for a project I'm working on. |
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Wed Jan 16, 2008 10:56 am Post subject: |
|
|
it's not a problem to make your own SMTP host, you can make one and then make an application based on your SMTP, then read what people send each other  |
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Wed Jan 16, 2008 11:35 am Post subject: |
|
|
Use indy-components.
Last edited by Reak on Thu Jan 17, 2008 4:42 am; edited 1 time in total |
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Wed Jan 16, 2008 12:15 pm Post subject: |
|
|
| Wiccaan wrote: | Care to give us the language you are writing this in? Can't give you much help with code if we don't know the language.  |
It's not extremly important, but C would be great. I could do with C++, Delphi, C# or stuff like this, whatever is good for you.
| Symbol wrote: | | http://www.e-eeasy.com/SMTPServerList.aspx |
Thanks, but it won't let me send... I guess they want me to have their mail and not just send it from any mail.. |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Thu Jan 17, 2008 7:52 am Post subject: |
|
|
I've seen stuff like this before, but I can't fins any SMTP server that will allow me to actually send email. Can you give me an example for a nice SMTP server? |
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Thu Jan 17, 2008 7:53 am Post subject: |
|
|
If ur isp is blocking 80 then you may not setup an own server. Right? _________________
Intel over amd yes. |
|
| Back to top |
|
 |
stealthy17 Expert Cheater
Reputation: 0
Joined: 10 Apr 2007 Posts: 144 Location: The Netherlands
|
Posted: Thu Jan 17, 2008 8:49 am Post subject: |
|
|
SMTP uses port 25 TCP
80 = HTTP
But yea you're right... Or you have to use your ISP's SMTP server for open relay instead. |
|
| Back to top |
|
 |
Elec0 Expert Cheater
Reputation: 0
Joined: 21 Nov 2007 Posts: 188 Location: Out of my mind, back in five minutes.
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Thu Jan 17, 2008 10:09 am Post subject: |
|
|
i did one too, which worked on my PC though, i'm not sure of the project will work on other since the app privilege is diffrent, ms are smart, i think some hotfix causes the app to cause an error if you try to send
thanks holyblah, i'll try your method when i'll get back |
|
| Back to top |
|
 |
stealthy17 Expert Cheater
Reputation: 0
Joined: 10 Apr 2007 Posts: 144 Location: The Netherlands
|
Posted: Thu Jan 17, 2008 10:54 am Post subject: |
|
|
Winsock and a public open relay SMTP server is all you need.
The SMTP protocol is one of the easiest there is...
Example session from Wiki:
| Code: |
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.org
S: 250 Hello relay.example.org, I am glad to meet you
C: MAIL FROM:<[email protected]>
S: 250 Ok
C: RCPT TO:<[email protected]>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <[email protected]>
C: To: Alice Example <[email protected]>
C: Cc: [email protected]
C: Date: Tue, 15 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 headers and 4 lines in the body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection} |
In VB6 style;
Winsock1.Connect <server ip>, <port>
Then you Winsock1.SendData("string of text") the data
You receive data with the Winsock_DataArrival event using the returning codes (250, 221 etc, you can validate what the next string to send will be)
Crappy explanation maybe but that's how it is hehe... Think about it and play around a bit... |
|
| Back to top |
|
 |
MegaForum Grandmaster Cheater
Reputation: 0
Joined: 20 Aug 2007 Posts: 558
|
Posted: Thu Jan 17, 2008 1:36 pm Post subject: |
|
|
| stealthy17 wrote: | Winsock and a public open relay SMTP server is all you need.
The SMTP protocol is one of the easiest there is...
Example session from Wiki:
| Code: |
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.org
S: 250 Hello relay.example.org, I am glad to meet you
C: MAIL FROM:<[email protected]>
S: 250 Ok
C: RCPT TO:<[email protected]>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <[email protected]>
C: To: Alice Example <[email protected]>
C: Cc: [email protected]
C: Date: Tue, 15 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 headers and 4 lines in the body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection} |
In VB6 style;
Winsock1.Connect <server ip>, <port>
Then you Winsock1.SendData("string of text") the data
You receive data with the Winsock_DataArrival event using the returning codes (250, 221 etc, you can validate what the next string to send will be)
Crappy explanation maybe but that's how it is hehe... Think about it and play around a bit... |
How you can you do that in C++  |
|
| Back to top |
|
 |
|