Send a mail with System.Net.Mail.SmtpClient

R

refv8

hi, i´m doing a aplication in asp.net 2.0 and i want send an automatic
mail when the users do an operations. i use the library
System.Net.Mail.MailMessage. and I specify all the properties
(to,from,body,host and port). i want send the mail by another port not
from the port 25. Can i do That?. I dont specify credencials.
i configure the server to the port that i want send in the IIS, but its
not works.

System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: 5.7.1 Unable to relay....

this is the error.

Can I send the mail by another port that is not the 25?

thks and sorry for my English!
 
S

sloan

I have a complete 2.0 (and 1.1) example at my blog.

You have to match the ports.
Your smtp server has to receive messages on a non standard port ........
If that's the case, then you can specify a different port number.

http://sholliday.spaces.live.com/ 2/8/2006 entry



hi, i´m doing a aplication in asp.net 2.0 and i want send an automatic
mail when the users do an operations. i use the library
System.Net.Mail.MailMessage. and I specify all the properties
(to,from,body,host and port). i want send the mail by another port not
from the port 25. Can i do That?. I dont specify credencials.
i configure the server to the port that i want send in the IIS, but its
not works.

System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: 5.7.1 Unable to relay....

this is the error.

Can I send the mail by another port that is not the 25?

thks and sorry for my English!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top