Showing posts with label smtp. Show all posts
Showing posts with label smtp. Show all posts

Monday, March 26, 2012

System.Net.Mail

This is some code for VB that is supposed to work in ASP. How come it
doesn't seem to work in ASP?
It is supposed to send mail to an SMTP server that requires a username and
password.

'create the mail message
'Dim mail As New MailMessage()

'set the addresses
'mail.From = New MailAddress("me@dotnet.itags.org.mycompany.com")
'mail.To.Add(test1@dotnet.itags.org.testdomain.com)

'set the content
'mail.Subject = "TEST TEST TEST This is an email"
'mail.Body = "this is the body content of the email."

'send the message
'Dim smtp As New SmtpClient("127.0.0.1")

'to authenticate we set the username and password properites on the
SmtpClient
'smtp.Credentials = New NetworkCredential("username", "secret")
'smtp.Send(mail)If you work thru my sample project ... at the blog, you'll find the
different switches you need to experiment with to get an "authentication"
email to work.

I have 1.1 and 2.0 syntaxes.

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

While the code is in C#, you'll at least see the properties you need to set.

You need to find the
TestApp_2_0 . Program.cs file.

Here is what to find ... under the 2/8/2006 entry
You can download the code HERE. (Right-Click and "Save As" works best)

"AbraAbraCadabra" <nws@.gsw-inc.comwrote in message
news:%23W2kW$6yGHA.1292@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

This is some code for VB that is supposed to work in ASP. How come it
doesn't seem to work in ASP?
It is supposed to send mail to an SMTP server that requires a username and
password.
>
>
'create the mail message
'Dim mail As New MailMessage()
>
'set the addresses
'mail.From = New MailAddress("me@.mycompany.com")
'mail.To.Add(test1@.testdomain.com)
>
'set the content
'mail.Subject = "TEST TEST TEST This is an email"
'mail.Body = "this is the body content of the email."
>
'send the message
'Dim smtp As New SmtpClient("127.0.0.1")
>
'to authenticate we set the username and password properites on the
SmtpClient
'smtp.Credentials = New NetworkCredential("username", "secret")
'smtp.Send(mail)
>
>


I tried your link on two different computers and they both crash about 10
seconds after viewing the first page. Is there a problem with your link?

"sloan" <sloan@.ipass.netwrote in message
news:eQwZRS7yGHA.4496@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>
If you work thru my sample project ... at the blog, you'll find the
different switches you need to experiment with to get an "authentication"
email to work.
>
I have 1.1 and 2.0 syntaxes.
>
http://sholliday.spaces.live.com/ 2/8/2006
>
While the code is in C#, you'll at least see the properties you need to
set.
>
You need to find the
TestApp_2_0 . Program.cs file.
>
>
Here is what to find ... under the 2/8/2006 entry
You can download the code HERE. (Right-Click and "Save As" works best)
>
>
>
"AbraAbraCadabra" <nws@.gsw-inc.comwrote in message
news:%23W2kW$6yGHA.1292@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>This is some code for VB that is supposed to work in ASP. How come it
>doesn't seem to work in ASP?
>It is supposed to send mail to an SMTP server that requires a username
>and
>password.
>>
>>
>'create the mail message
>'Dim mail As New MailMessage()
>>
>'set the addresses
>'mail.From = New MailAddress("me@.mycompany.com")
>'mail.To.Add(test1@.testdomain.com)
>>
>'set the content
>'mail.Subject = "TEST TEST TEST This is an email"
>'mail.Body = "this is the body content of the email."
>>
>'send the message
>'Dim smtp As New SmtpClient("127.0.0.1")
>>
>'to authenticate we set the username and password properites on the
>SmtpClient
>'smtp.Credentials = New NetworkCredential("username", "secret")
>'smtp.Send(mail)
>>
>>


>
>


Use a browser besides IE.

I think microsoft sent an update out for IE.. and it crashes when it goes to
a spaces.msn.com/somebody type site.

They redid the look/feel of the msn spaces.

I get the same issue sometimes.

I thought it was just me, but apparently not.

"AbraAbraCadabra" <nws@.gsw-inc.comwrote in message
news:evdOsLFzGHA.4044@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

I tried your link on two different computers and they both crash about 10
seconds after viewing the first page. Is there a problem with your link?
>
>
>
>
"sloan" <sloan@.ipass.netwrote in message
news:eQwZRS7yGHA.4496@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by


If you work thru my sample project ... at the blog, you'll find the
different switches you need to experiment with to get an


"authentication"

Quote:

Originally Posted by

Quote:

Originally Posted by

email to work.

I have 1.1 and 2.0 syntaxes.

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

While the code is in C#, you'll at least see the properties you need to
set.

You need to find the
TestApp_2_0 . Program.cs file.

Here is what to find ... under the 2/8/2006 entry
You can download the code HERE. (Right-Click and "Save As" works best)

"AbraAbraCadabra" <nws@.gsw-inc.comwrote in message
news:%23W2kW$6yGHA.1292@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

This is some code for VB that is supposed to work in ASP. How come it
doesn't seem to work in ASP?
It is supposed to send mail to an SMTP server that requires a username
and
password.
>
>
'create the mail message
'Dim mail As New MailMessage()
>
'set the addresses
'mail.From = New MailAddress("me@.mycompany.com")
'mail.To.Add(test1@.testdomain.com)
>
'set the content
'mail.Subject = "TEST TEST TEST This is an email"
'mail.Body = "this is the body content of the email."
>
'send the message
'Dim smtp As New SmtpClient("127.0.0.1")
>
'to authenticate we set the username and password properites on the
SmtpClient
'smtp.Credentials = New NetworkCredential("username", "secret")
'smtp.Send(mail)
>
>



>
>

System.net.Mail default smtp host

i was using the old system.web.mail classes.
and try to sent emails with net.mail, but i get an exception:
System.Net.Mail.SmtpFailedRecipientException was unhandled by user code
Message="Mailbox unavailable. The server response was: 5.7.1 Unable to relay for bla@dotnet.itags.org.bla.bla"

host property of SmtpClient must be set up! but what is default smpt host? is it "localhost"? i get an exception if i use it.Tongue Tied
thank u for ur advice

if i use this code it works for me (System.Web.Mail):

SmtpMail.SmtpServer =null;

SmtpMail.Send(mail);
because the name of the local SMTP server is used!!!!!!
WHAT NAME IS IT? how can i find it out?
i need the name to set the Host property of SmtpClient (System.Net.Mail).
thank u for ur advice


Hello.

I believe that you should use the classes SmtpClient and MailMessage to send your email message.


i still need ur help
Hello.
See if this helps:
http://www.developer.com/net/net/article.php/3511731

hi,

i m sorry but it has nothing to do with my question!


Hello.
not sure on what you0re after, but normally you use set that propertywith the name of the server. and you're the only one that know that...

Hi,
Did you find a solution to this problem...I am having the same problem. I use System.Mail.Net with the following code
SmtpClient client = new SmtpClient("localhost");
client.Send(message);
And get the following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.
abc.abc
Many thanks for any help you can provide.

msplants wrote:

Hi,
Did you find a solution to this problem...I am having the same problem. I use System.Mail.Net with the following code
SmtpClient client = new SmtpClient("localhost");
client.Send(message);
And get the following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.
abc.abc
Many thanks for any help you can provide.


As the error says:
The email server is not accepting mail from the server that the code resides in...
despite the fact that this site is based on 1.1's mail code, the server errors apply to any code trying to use a mail server
http://www.systemwebmail.net/faq/4.3.11.aspx

hey,

no, i still can not find the answer!

localhost is not a default smtp server.
HOW TO FIND THE NAME OFdefault smtp server?


stWooE wrote:

HOW TO FIND THE NAME OFdefault smtp server?


- Ask your IT department
or
- Goto the computer where the SMTP service lives, and use either (1) The name of the computer or (2) the IP address of the computer
And as noted in my last post, if there is any sort of permissions/security set on the SMTP service, you'll need to allow your web server to "relay" mail through it, all of it is at that website i linked to
- i talk all the time about my local smpt server
- for sure, i have tried the name of my comuter and ip, i get the same error!
i can only send emails with the deprecated classes from the version 1.1
but thank u anyway

this problem disppears if I change the Relay properties to "All except the list below", however this is not an acceptable configuration. Any help from here?
Thanks in advance


Hi, i know this post is rather old but i've searched the forums and found this thread hanging around and i have exactly the same problem as the original poster and i was wondering if perhaps some1 could give me some insight as to how to solve this this time around.

What do i type in host?

tx in advance,

Me


It's an even older post now, and I spent ages finding an answer to this problem, which still doesn't clearly appear her. So here goes:

If you are using the SMTP server that is installed with IIS, you need to allow relaying for 127.0.0.1 (localhost) in the SMTP Server properties. This can be found on the Access tab at the bottom - Relay Restrictions.

Under "Select which computer may relay through this virtual server", "Only the list below" should be checked. If not, check it, as this will prevent spammers hijacking your SMTP server. Then click "Add" and add 127.0.0.1 into the IP address.

In your script, you may well have something like this:

SmtpClient client = new SmtpClient();
client.Send(message);

You now need to add the bold line below:

SmtpClient client = new SmtpClient();
client.Host = "127.0.0.1";
client.Send(message);

Hope This Helps.

System.Net.Mail SMTP Pickup Dir

Hi,

I am trying to write .eml files to a remote UNC directory - do you
know if this could be done, such as:

<mailSettings>
<smtp>
<network

host="localhost"
port="25"
/
<specifiedPickupDirectory pickupDirectoryLocation="\\server1\Pickup"/>
</smtp>
</mailSettings
If so, would I have to change the defaultCredentials or the security
context for ASP.NET (using machine.config)? I haven't exactly done
that before.

Thank you,
MichaelFYI: I found the answer in case anyone wonders about this. Make sure
the AppPool for the IIS web site is running as IWAM_machinename and
that the \Pickup windows share allows IWAM_machinename (using same
username/password on remote machine) write access in addition to the
NTFS write for that subdirectory is allowed.

mpaine@.htxml.com wrote:

Quote:

Originally Posted by

Hi,
>
>
I am trying to write .eml files to a remote UNC directory - do you
know if this could be done, such as:
>
<mailSettings>
<smtp>
<network
>
host="localhost"
port="25"
/>
>
<specifiedPickupDirectory pickupDirectoryLocation="\\server1\Pickup"/>
</smtp>
</mailSettings>
>
If so, would I have to change the defaultCredentials or the security
context for ASP.NET (using machine.config)? I haven't exactly done
that before.
>
>
Thank you,
Michael

System.Net.Mail.SmtpClient

Hi all,

We are using the Asp.Net SMTP Client to send email via our Exchange 2003 SP2
Server. When trying to send email to a local recipient I am getting the
following error:-

Server: 172.19.2.21. Message: Mailbox unavailable. The server response was:
5.7.1 Requested action not taken: message refused

What is causing this? The asp.net machine is on the same LAN as the Exchange
Server. I checked the Exchange Server and all local IPs are in the "allow"
list.

TIA!How do you have the Recipient MailAddress setup? Are you using
name@.domain.local or name@.domain.com
Sounds like an issue with formatting the address correctly, and now
with SmtpClient

param@.community.nospam wrote:

Quote:

Originally Posted by

Hi all,
>
We are using the Asp.Net SMTP Client to send email via our Exchange 2003 SP2
Server. When trying to send email to a local recipient I am getting the
following error:-
>
Server: 172.19.2.21. Message: Mailbox unavailable. The server response was:
5.7.1 Requested action not taken: message refused
>
>
What is causing this? The asp.net machine is on the same LAN as the Exchange
Server. I checked the Exchange Server and all local IPs are in the "allow"
list.
>
TIA!


For the recipient mailaddress I am using name@.domain.com
If I change the SMTPServer on the SMTPClient to another smtp server,
everything works fine.

What could be causing this?

"Sean Chambers" <dkode8@.gmail.comwrote in message
news:1158344339.960590.194450@.h48g2000cwc.googlegr oups.com...

Quote:

Originally Posted by

How do you have the Recipient MailAddress setup? Are you using
name@.domain.local or name@.domain.com
>
Sounds like an issue with formatting the address correctly, and now
with SmtpClient
>
param@.community.nospam wrote:

Quote:

Originally Posted by

>Hi all,
>>
>We are using the Asp.Net SMTP Client to send email via our Exchange 2003
>SP2
>Server. When trying to send email to a local recipient I am getting the
>following error:-
>>
>Server: 172.19.2.21. Message: Mailbox unavailable. The server response
>was:
>5.7.1 Requested action not taken: message refused
>>
>>
>What is causing this? The asp.net machine is on the same LAN as the
>Exchange
>Server. I checked the Exchange Server and all local IPs are in the
>"allow"
>list.
>>
>TIA!


>


I have complete 1.1 and 2.0 examples here:
http://sholliday.spaces.live.com/
2/8/2006 entry.

You need to try the different authentication modes.

Also. check C:\Inetpub\mailroot and see if they're jammed up there.

<param@.community.nospamwrote in message
news:%23gNx4lQ2GHA.1548@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

For the recipient mailaddress I am using name@.domain.com
>
If I change the SMTPServer on the SMTPClient to another smtp server,
everything works fine.
>
What could be causing this?
>
"Sean Chambers" <dkode8@.gmail.comwrote in message
news:1158344339.960590.194450@.h48g2000cwc.googlegr oups.com...

Quote:

Originally Posted by

How do you have the Recipient MailAddress setup? Are you using
name@.domain.local or name@.domain.com
Sounds like an issue with formatting the address correctly, and now
with SmtpClient

param@.community.nospam wrote:

Quote:

Originally Posted by

Hi all,
>
We are using the Asp.Net SMTP Client to send email via our Exchange


2003

Quote:

Originally Posted by

Quote:

Originally Posted by

Quote:

Originally Posted by

SP2
Server. When trying to send email to a local recipient I am getting the
following error:-
>
Server: 172.19.2.21. Message: Mailbox unavailable. The server response
was:
5.7.1 Requested action not taken: message refused
>
>
What is causing this? The asp.net machine is on the same LAN as the
Exchange
Server. I checked the Exchange Server and all local IPs are in the
"allow"
list.
>
TIA!



>
>


Hello Param,

As for the send mail code, are you using the "Network" as the SmtpClient's
"SmtpDeliveryMethod" and have you tried supply a credential or use the
default credential. Also, when using Exchange server in a domain
environment, you should make sure you have permission to send mail as the
"From" address since exchange server will validate this at server-side.

In addition, as you mentioned it works when using another SMTP server, is
that SMTP server a normal SMTP relay server which also transfer message to
another exchange server? If possible you can also create a local
smtpserver through IIS which act as a relay server to the Exchange server
and send mail through this local SMTP server to see whether it works.

So far based on my experience, it is likely a server environment specific
issue. Here is a simple code snippet which works for sending mail to local
domain user through local network exchange server:

==========================
private void btnSend_Click(object sender, EventArgs e)
{
MailMessage msg = new
MailMessage("steven@.microsoft.com","steven@.microsoft.com");
msg.Subject = "Smtp Client Test Message";
msg.IsBodyHtml = true;
msg.Body = "<font size='30'>Hello World</font>";

SmtpClient sc = new SmtpClient("smtphost");

sc.DeliveryMethod = SmtpDeliveryMethod.Network;

sc.UseDefaultCredentials = true;

sc.Send(msg);

}
===========================

Please feel free to post here if you have any other finding or any other
questions on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Saturday, March 24, 2012

System.Net.Mail.SmtpClient.Send() Error: An invalid character was found in the mail header

hi all!

please help!

I wanted to make an automatic email when I create user by CreateUserWizard. So I configured SMTP, then in properties of the wizard indicated textfile for message and wrote simple subject "registration"

but I have an exception (like in subj).

I even tried to set the subject in event handler for "emailsending" event. Same exception.

What is wrong? How could I fix it?

Here us some info from stack:

[FormatException:An invalid character was found in the mail header.] System.Net.BufferBuilder.Append(String value, Int32 offset, Int32 count) +915954 System.Net.Mail.EHelloCommand.PrepareCommand(SmtpConnection conn, String domain) +106 System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +835 System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +316 System.Net.Mail.SmtpClient.GetConnection() +42 System.Net.Mail.SmtpClient.Send(MailMessage message) +1485

[SmtpException: Email send failure.] System.Net.Mail.SmtpClient.Send(MailMessage message) +2074 System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +341 System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +571 System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453 System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149 System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +171 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Hi there, can i just ask why you choose me? as for your problem, it looks like there is an invalid character in the mail header, so either there is nothing in it or something there shouldnt be, try taking a few steps back, if your attaching a text file just simply put a few words coded in, and if your header is dynamic try making it hard coded


You were online. Sorry.

It is more simple. There is simpliest string, like "123". Same error


hey no worries, well try a string like abc, also make sure no fields are not left blank. What usually helps me is take a 10 min break, clear you head have a coffee and come back look through your code as if you have never seen it before. something may catch. Im not the worlds best .neter but i usually find if there is a problem its often by taking things back to basic it helps


If your still not having any success you could try the code below and see if it makes any difference.

Regards

Martijn

Sub mailout()Dim mailAsNew Net.Mail.MailMessage()

'set the addresses

mail.To.Add("recipient@.whereever.com")

mail.From =New Net.Mail.MailAddress("sender@.wherever.com"))

'set the content

mail.Subject ="Email Subject line"

mail.Body ="The main body of the email message"

'send the message

Dim smtpAsNew Net.Mail.SmtpClient("smtp.whereever.com")

'to authenticate we set the username and password properites on the SmtpClient

smtp.Credentials =New Net.NetworkCredential("smtp-accountname e.g. sender@.wherever.com","smtp-account-password")

Try

smtp.Send(mail)

response.write("Email sent successfully")

Catch ExAs Exception

response.write("Email send failed error code is... " & Ex.Message)

EndTry

EndSub


no success, same error


I cant come up with any conclusions from your stack trace.

The code I gave you I copied out of an application I wrote there was something I had missed and should have cleaned up in the following line

mail.From =New Net.Mail.MailAddress(Session(sender@.wherever.com))

It should be this (no reference to any session variable)

mail.From =New Net.Mail.MailAddress(sender@.wherever.com)

The only other question is does your recipient or sender email address have any unusual charactors or attempt to have a space in it? Any thing like that could cause a problem. Try the same code with different email addresses and different content.

Sorry no other suggestions

Martijn


May be this piece of code will help:

<system.net>
<mailSettings>
<smtp from="evdokp@.pochta.ru">
<network host="mail.pochta.ru" password="[мой пароль]" userName="evdokp@.pochta.ru" />
</smtp>
</mailSettings>
</system.net>

this is how ASP.NET build-it configuration tool edits web.config

Well, my additional question is: where does the tool sets port value?


ok, my sugesstion is to take remove the brackets from the password and to use a password with standard English character set without and spaces.

Be sure to update the password on the mail server too.

Good luck

<system.net>
<mailSettings>
<smtp from="evdokp@.pochta.ru">
<network host="mail.pochta.ru" password="myPassword" userName="evdokp@.pochta.ru" />
</smtp>
</mailSettings>
</system.net>


it is not that easy.

these brackets are there just because I hide my password. It was like you say "myPassword"

Do you know where port is defined in web.config?

System.Net.Mail.SmtpException

My webserver does not have smtp on it but I'm still able to relay email to my email server with user name and password, my first question is that the dotnet is using an API that's built into server to relay?

Also email stopped working a day ago with error messageSyntax error, command unrecognized. The server response was: 5.1.0 Dropping connection due to an error on this server . Could this error be caused by the internal process dotnet uses to relay not working?

The 5.1.0 error is usually on the remote SMTP server and the error is propogated back to you. Does the server you relay to allow relays?

You're not relaying. System.Net.Mail simply sends the message to the defined SMTP server. Your error is a SMTP error, check the logs on the SMTP server to see what is happening, if you can. A 5.1.0 is a Sender Denied error, which most likely means you now need to use authentication. Checkwww.systemnetmail.com for help and samples.

Jeff


Still not getting this working getting, any help would be appreciated.

System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it

Line 88: try
Line 89: {
Line 90: client.Send(message);
Line 91: Response.Redirect("RequestAccepted.aspx");
Line 92: }
Source File:d:\Inetpub\KPClient\ContactUS.aspx.cs Line:90

Stack Trace:

[SocketException (0x274d): No connection could be made because the target machine actively refused it] System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +1001874 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431[WebException: Unable to connect to the remote server] System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +1447464 System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +190 System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21 System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +318 System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +227 System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +316 System.Net.Mail.SmtpClient.GetConnection() +42 System.Net.Mail.SmtpClient.Send(MailMessage message) +1485


This turned out to be a bad router change that was not documented.