c# - Smtp mail delivered unsuccessfully -


i using smtp send mail.a message sent not delivered. reason behind this.is problem in mailing server?the message sending process working fine last couple of years.the issue came first time.

public bool sendmail(string p_strfrom, string p_strdisplayname, string p_strto, string p_strsubject, string p_strmessage , string strfilename)  {      try      {          p_strdisplayname = _displayname;          string smtpserver = _smtpserver;          smtpclient smtpclient = new smtpclient();          mailmessage message = new mailmessage();          mailaddress fromaddress = new mailaddress(_from,_displayname);          smtpclient.host = _smtpserver;          smtpclient.port = convert.toint32(_port);          string strauth_username = _username;          string strauth_password = _password;          if (strauth_username != null)          {              system.net.networkcredential smtpuserinfo = new system.net.networkcredential(strauth_username, strauth_password);              smtpclient.usedefaultcredentials = false;              if (_ssl)              {                  smtpclient.enablessl = true;              }              smtpclient.credentials = smtpuserinfo;          }          message.from = fromaddress;           message.subject = p_strsubject;          message.isbodyhtml = true;          message.body = p_strmessage;          message.to.add(p_strto);          try          {              smtpclient.send(message);              log.writespeciallog("smtpclient mail sending first try success", "");          }           catch (exception ee)          {              log.writespeciallog("smtpclient mail sending first try failed : " + ee.tostring(), "");              return false;          }          return true;      }      catch (exception ex)      {          log.writelog("smtpclient mail sending overall failed : " + ex.tostring());            return false;      }  } 

a message sent not delivered

if sent mailing server possible reason of non delivery can mail filter on client blocked or delivered in junk.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -