how to send mail using exchange mail server
-
HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?
-
HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?
SwastikInfosystems wrote:
smtp.Host = "MailServerName";
How about changing this for your actual mail server name? You've given us nothing else to go on.... no error information... nothing, just a standard bit of code where were magically meant to know what's wrong.
-
HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?
-
you have blatently just copied this from the internet and not adapted it at all for your own use, try applying your own knowledge to the code then post on this forum
thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.
modified on Thursday, March 27, 2008 7:09 AM
-
thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.
modified on Thursday, March 27, 2008 7:09 AM
-
thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.
modified on Thursday, March 27, 2008 7:09 AM
-
HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?
I have to admit, you at least did a google after last time. However, you have no right to be abusive when people point out the obvious. You need to do more than copy and paste to be a programmer, you need to read the sample code you find, understand it, and configure it for your use. In this case, you need to provide a real mail server name. I assume you just work for SwastikInfoSystems, but have you thought of telling your clueless manager that the name he chose for his company is offensive to his target market ?
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )