if i want to send email form my program i need a SMTP library right?
so do u know of any free libraries for API?
if i want to send email form my program i need a SMTP library right?
so do u know of any free libraries for API?
Well you need to say which OS and compiler you have if you want a half-decent answer.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
windows xp, dev-c++
isn't it possible to send email with winsock?
Yes, read up on the RFC ( http://www.ietf.org/rfc/rfc0821.txt )
thanks, it's a nice site =)
i have a problem:
i'm sening the server the data in the order specified in the site, and i get the right replys, but when i open the mailbox i sent the message to, there is only a message with no contents nor sender info - it's completely empty.
the same happens when i send an email with a demo program i've downloaded.
what's wrong?
If it does it with a seperate email client also, then it could be the POP3 (If thats what it uses) thats messed up the other end. Or it could be something to do with your internet connection (firewall?)
oops i had a really foolish mistake, in the data i forgot to put "From:" "To:" etc.
1 last question:
in all the mail servers, the server name is mail.<what behind the @> ?
for example:
[email protected]=> server: mail.aaa.bbb
Last edited by hiya; 06-26-2005 at 01:50 AM.
Get ethereal.
Watch what happens when your real email client sends mail
Watch what happens when your code sends mail
Study the differences in messages.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
No. If you want to send directly to the destination mail server, you must do a MX lookup for the destination domain. However, you should send mail to the local outgoing mail server of your ISP. Typically, you should ask the user for this server name when setting up an email account. Some ISPs block direct communication with other mail servers because of problems with spam zombies.Originally Posted by hiya
oh.. ok, thanks.
btw, what is that MX?
it is a MAIL EXCHANGE lookup request
This forum is the best one I've ever seen. Great ppl, great coders
Its the mail exchanger record in the DNS server. Thats how your ISP's SMTP relay server knows about the mail server for any domain. Like for example for a domain like www.yahoo.com, it has its own mail server (infact more than one) to exchange mails for the domain yahoo.com. When your ISPs SMTP relay server receives a mail for yahoo.com domain. It sends a DNS query to its local DNS server which then queries yahoo's DNS server ( there might be some intermediate DNS servers here) who returns the DNS record for the domain yahoo.com. The DNS record contains 'A' records (user to open www.yahoo.com) and 'MX' records used to send mails to the domain yahoo.comOriginally Posted by hiya
following is the output of dns query to the domain yahoo.com
yahoo.com internet address = 216.109.112.135
yahoo.com internet address = 66.94.234.13
yahoo.com MX preference = 1, mail exchanger = mx2.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = mx3.mail.yahoo.com
yahoo.com MX preference = 5, mail exchanger = mx4.mail.yahoo.com
yahoo.com MX preference = 1, mail exchanger = mx1.mail.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns2.yahoo.com
yahoo.com nameserver = ns3.yahoo.com
yahoo.com nameserver = ns4.yahoo.com
yahoo.com nameserver = ns5.yahoo.com
yahoo.com nameserver = ns1.yahoo.com
mx2.mail.yahoo.com internet address = 67.28.114.36
mx2.mail.yahoo.com internet address = 4.79.181.13
mx2.mail.yahoo.com internet address = 64.156.215.8
mx2.mail.yahoo.com internet address = 67.28.114.35
mx3.mail.yahoo.com internet address = 64.156.215.18
mx3.mail.yahoo.com internet address = 4.79.181.12
mx3.mail.yahoo.com internet address = 64.156.215.5
mx3.mail.yahoo.com internet address = 64.156.215.6
mx4.mail.yahoo.com internet address = 67.28.113.19
mx4.mail.yahoo.com internet address = 68.142.202.11
mx4.mail.yahoo.com internet address = 68.142.202.12
mx4.mail.yahoo.com internet address = 66.218.86.156
ns1.yahoo.com internet address = 66.218.71.63
>
mail exchange records are the mail servers for yahoo.com domain. As you can see there are more than one and they are assigned appropriate preferences.