asp.net - exception while sending mail -


i sending mail giving me exception

mailbox name not allowed. server response was: sorry, relaying denied location [182.72.17.210] (#5.7.1) 

my code

 public static string sendmailhtmlfromat(string sform, string sto, string ssub, string smsg)         {             mailmessage mailmsg = new mailmessage();             mailmsg.to.add(sto);             mailmsg.from = new mailaddress(sform);             mailmsg.subject = ssub;             mailmsg.isbodyhtml = true;             mailmsg.body = smsg;             try             {                 //smtpclient smtp = new smtpclient("smtpout.secureserver.net", 25);                 smtpclient smtp = new smtpclient("relay-hosting.secureserver.net", 25);                 smtp.credentials = new system.net.networkcredential("admin@beautiful.com", "smart123");                 smtp.send(mailmsg);             }             catch (exception e)             {     }             return "";         } 

is problem in smtpclient declaring

check below link.
http://www.eggheadcafe.com/community/aspnet/2/10227041/exception-while-sending-mail.aspx


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -