M
Mark A. Sam
Hello,
I am sending two emails from the same procedure, one to myself (while testing) and another (a comfirmation) to the user on the website.
I was having difficulty finding a relay server to SMTP though, but was able to do this though one of my personal account, Cabbage.Org. It doesn't make any sense to me why this works and no other account, including localhost and the remote server which hosts the website.
Here is a code snippet showing the sending of both emails:
**************************
Dim MailObj As New System.Net.Mail.SmtpClient
MailObj.Host = "smtp.youthkaraoke.org"
MailObj.Send("(e-mail address removed)", "(e-mail address removed)", strSubject, strBody) 'Change (e-mail address removed) to working email
'Send confirmation to sender
strBody = "Thank you for submitting your request to Dragon Importing" + vbNewLine + _
"You will be contacted soon by one of our reprresentives!" + vbNewLine + vbNewLine + _
"The Dragon Importing Staff"
MailObj.Send("(e-mail address removed)", txtEmail.Text, "Confirmation", strBody)
*********************************
In the first send, (e-mail address removed) is the recipient and the letter goes through without a problem. In the second, if the value of txtEmail.Text is (e-mail address removed), then no problem either, but if any other email address is used then I get this error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected
Source Error:
Line 79: "You will be contacted soon by one of our reprresentives!" + vbNewLine + vbNewLine + _
Line 80: "The Dragon Importing Staff"
Line 81: MailObj.Send("(e-mail address removed)", txtEmail.Text, "Confirmation", strBody)
Line 82:
Line 83:
Source File: C:\Domains\dragonimporting.com\wwwroot\Contact.aspx.vb Line: 81
Stack Trace:
[SmtpException: Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected ]
Any help I can get is appreciated.
Thank you and God Bless,
Mark A. Sma
I am sending two emails from the same procedure, one to myself (while testing) and another (a comfirmation) to the user on the website.
I was having difficulty finding a relay server to SMTP though, but was able to do this though one of my personal account, Cabbage.Org. It doesn't make any sense to me why this works and no other account, including localhost and the remote server which hosts the website.
Here is a code snippet showing the sending of both emails:
**************************
Dim MailObj As New System.Net.Mail.SmtpClient
MailObj.Host = "smtp.youthkaraoke.org"
MailObj.Send("(e-mail address removed)", "(e-mail address removed)", strSubject, strBody) 'Change (e-mail address removed) to working email
'Send confirmation to sender
strBody = "Thank you for submitting your request to Dragon Importing" + vbNewLine + _
"You will be contacted soon by one of our reprresentives!" + vbNewLine + vbNewLine + _
"The Dragon Importing Staff"
MailObj.Send("(e-mail address removed)", txtEmail.Text, "Confirmation", strBody)
*********************************
In the first send, (e-mail address removed) is the recipient and the letter goes through without a problem. In the second, if the value of txtEmail.Text is (e-mail address removed), then no problem either, but if any other email address is used then I get this error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected
Source Error:
Line 79: "You will be contacted soon by one of our reprresentives!" + vbNewLine + vbNewLine + _
Line 80: "The Dragon Importing Staff"
Line 81: MailObj.Send("(e-mail address removed)", txtEmail.Text, "Confirmation", strBody)
Line 82:
Line 83:
Source File: C:\Domains\dragonimporting.com\wwwroot\Contact.aspx.vb Line: 81
Stack Trace:
[SmtpException: Syntax error, command unrecognized. The server response was: Unauthorized relay msg rejected ]
Any help I can get is appreciated.
Thank you and God Bless,
Mark A. Sma