Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Failure to Sending mail

Author  Topic 

thendraljazz
Starting Member

26 Posts

Posted - 2011-12-20 : 06:09:36
Hi,

In local it was working but after uploading in server it will give failure sending mail..is ther any problem?Can any one help me?

Here is my code...

msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = true;
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.Priority = MailPriority.High;
msg.From = new MailAddress(@"enquiry@gmail.com");
msg.To.Add(@"thendral.marlen@gmail.com");
msg.Subject = "Strikeaprice_Enquiry";
msg.Body = strMailString.ToString();
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port =587;
smtp.Credentials = new NetworkCredential(@"enquiry@gmail.com", "password");
//smtp.Credentials = new System.Net.NetworkCredential(@"enquiry@strikeaprice.com", "strike123");
//smtp.UseDefaultCredentials = false;

smtp.EnableSsl = true;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
try
{
smtp.Send(msg);
string msgss = "<script>alert('Successfully Send')</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", msgss);
}
catch (Exception ex)
{
Response.Write(ex.Message.ToString());
//lblerror.ForeColor = System.Drawing.Color.Red;
//lblerror.Text = "Error occured while sending your message." + ex.Message;
}

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2011-12-20 : 07:09:02
What's the error?

I imagine that you have no route to the host which is probably a firewall setting. But it could be a local environment change. Post the error message.

Also -- do you really want / should you be:
Exposing those email addresses? you should change your post to take out the email addresses. I see you have also posted passwords for those accounts......... thats..... stupid.

I just tried to log in as you and gmail is quite happy to try and let me. CHANGE YOUR POST before someone more malicious comes along.

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2011-12-20 : 07:09:15
Hey <EMAIL REDACTED>, is that really you?

It looks like you’re signing in to your account from a new location. Just so we know this is you — and not someone trying to hijack your account — please complete this quick verification. Learn more about this additional security measure.

Choose a verification method


Confirm my recovery email address: k••••••••••••••••n@gmail.com
Hint: k••••••••••••••••n@gmail.com
Google will check if this is the same email address we have on file – we won't send you any messages.

Answer my security question

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page
   

- Advertisement -