Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email?

Status
Not open for further replies.

jl280328

Programmer
Jun 15, 2006
97
US
Hi I am trying to automatically send an email from one of my pages. This is the code I am using:
Code:
objMailMessage = New MailMessage
							objMailMessage.From = ViewState("Email").Trim()
							objMailMessage.To= EReader("Email").Trim()
							objMailMessage.Subject= "CONTRACT OFFER"
							objMailMessage.Body = "Congratulations " & Ereader("FirstName") & " " & EReader("LastName") & "! " & vbcrlf & "You have been offered a contract by " & ViewState("GM") & " of the " & ViewState("TeamName") & ". "
							If Goods.Text.Trim() <> "" Then
								objMailMessage.Body &= "They have also offered: " & Goods.Text & " If you sign with their team. "
							End If
							objMailMessage.Body &= "The Turkey Bowl Administration would like to wish you the best in your decision click the link below, and sign in, to either sign with this team or decline the offer." & vbcrlf & "[URL unfurl="true"]http://www.carletonasptest.com/websitestatesearch/TConfirm.aspx"[/URL]
							SmtpMail.SmtpServer = "CarletonInc.local"
							SmtpMail.Send( objMailMessage )

The weird thing is that it worked for a couple months just fine, but now it works sometimes just fine, but other times I get a failed to connect to transport error. I was wondering what would be causing it to work so erratically, and since I have access to the server is there a command that I can type into the command prompt to find the SMTP address rather than using "CarletonInc.local"?
 
If you ping "CarletonInc.local", it should give you the IP Address of the server. Is that what you mean?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
the failed to connect to transport error could be the result of a busy network. wheres the email server? at your location or on the WAN?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top