Hi,
In my application(built using Asp.Net) i am facing an issue while sending emails and this issue comes up only on the Production server, locally on my machine the same functionality works fine like i can send and receive emails, the situation is there is no error i can see in the system on Production server.
I am using smtp configuration to send emails with port no. 25.
Any kind of inputs or help will be appreciated.
Thanks in advance.
jitendra mane3 pointsPosted Aug 12, 2014, 10:32 PM EDT
public static bool SendMailWithBCC(string from, string strToCsvEmail, string subject, string message, string strCSVBCCEmail, string attachDocumentPath) { try { MailMessage mailMessage = new MailMessage(new MailAddress(from), new MailAddress(strToCsvEmail)); int Port = 25; mailMessage.Subject = subject; mailMessage.IsBodyHtml = true; mailMessage.Body = message; System.Net.NetworkCredential networkCredentials = new System.Net.NetworkCredential("{Enter mail here}", "{Password}"); SmtpClient smtpClient = new SmtpClient(); smtpClient.EnableSsl = true; smtpClient.UseDefaultCredentials = false; smtpClient.Credentials = networkCredentials; //smtpClient.Host = "smtp.gmail.com"; smtpClient.Host = "smtp-mail.outlook.com"; smtpClient.Port = Port; smtpClient.Send(mailMessage); return true; } catch (Exception ex) { ex.ToString(); return false; } }chetan chandan37 pointsPosted Aug 13, 2014, 9:28 PM EDT
Thanks a ton for your reply, but the thing is the functionality what i have written is working fine on my machine, but it doesn't work on the client's machine, if you have come across this kind of situation please give me your inputs.
Others are also requested to share their views.
Thanks.