Click here to Skip to main content
15,901,373 members
Home / Discussions / C#
   

C#

 
QuestionError-While sending Mail Pin
Satish - Developer18-Nov-07 22:40
Satish - Developer18-Nov-07 22:40 
AnswerRe: Error-While sending Mail Pin
duncanmhor18-Nov-07 22:46
duncanmhor18-Nov-07 22:46 
GeneralRe: Error-While sending Mail Pin
Satish - Developer18-Nov-07 22:55
Satish - Developer18-Nov-07 22:55 
GeneralRe: Error-While sending Mail Pin
duncanmhor18-Nov-07 23:01
duncanmhor18-Nov-07 23:01 
GeneralRe: Error-While sending Mail Pin
Satish - Developer18-Nov-07 23:31
Satish - Developer18-Nov-07 23:31 
AnswerRe: Error-While sending Mail Pin
Sun Rays19-Nov-07 0:18
Sun Rays19-Nov-07 0:18 
GeneralRe: Error-While sending Mail Pin
Satish - Developer19-Nov-07 0:27
Satish - Developer19-Nov-07 0:27 
GeneralRe: Error-While sending Mail Pin
Sun Rays19-Nov-07 0:40
Sun Rays19-Nov-07 0:40 
Hi,

Satish - Developer wrote:
MailAddress SendFrom = new MailAddress(txtFromAddr.Text);


without doing this. Just create mailmessage object.

MailMessage objMailMessage = new MailMessage();<br />
objMailMessage.To = "toUser's email ID";<br />
objMailMessage.Subject = Convert.ToString(txtSubject.Text);<br />
objMailMessage.Body = Convert.ToString(webBrowser1.DocumentText);<br />
objMailMessage.IsBodyHtml = true;<br />
<br />
SmtpClient objSmtpClient = new SmtpClient();<br />
objSmtpClient.Host = "mail.domain.com";<br />
objSmtpClient.Credentials = new System.Net.NetworkCredential("uname", "pwd");<br />
<br />
objSmtpClient.Send(objMailMessage);<br />


Just try this. If you are getting error then u must have to chekc for smtp setting of server.

Thanks,
Sun Rays

Rate this post if you like answer.


My Articles

AnswerRe: Error-While sending Mail Pin
Shpendh19-Nov-07 1:50
Shpendh19-Nov-07 1:50 
Questionhelp regarding windows media player Pin
anu8118-Nov-07 22:24
anu8118-Nov-07 22:24 
AnswerRe: help regarding windows media player Pin
sindhutiwari18-Nov-07 22:31
sindhutiwari18-Nov-07 22:31 
GeneralRe: help regarding windows media player Pin
anu8118-Nov-07 22:45
anu8118-Nov-07 22:45 
Questiongraphical grid Pin
sindhutiwari18-Nov-07 22:21
sindhutiwari18-Nov-07 22:21 
AnswerRe: graphical grid Pin
AB777118-Nov-07 22:54
AB777118-Nov-07 22:54 
GeneralRe: graphical grid Pin
sindhutiwari18-Nov-07 22:57
sindhutiwari18-Nov-07 22:57 
GeneralRe: graphical grid Pin
AB777118-Nov-07 23:03
AB777118-Nov-07 23:03 
QuestionUsing .NET 2.0 from VS2003 editor ? Pin
N a v a n e e t h18-Nov-07 21:59
N a v a n e e t h18-Nov-07 21:59 
AnswerRe: Using .NET 2.0 from VS2003 editor ? Pin
pmarfleet18-Nov-07 22:37
pmarfleet18-Nov-07 22:37 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
N a v a n e e t h18-Nov-07 22:56
N a v a n e e t h18-Nov-07 22:56 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
duncanmhor18-Nov-07 23:05
duncanmhor18-Nov-07 23:05 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
pmarfleet18-Nov-07 23:08
pmarfleet18-Nov-07 23:08 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
N a v a n e e t h18-Nov-07 23:23
N a v a n e e t h18-Nov-07 23:23 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
originSH18-Nov-07 23:55
originSH18-Nov-07 23:55 
GeneralRe: Using .NET 2.0 from VS2003 editor ? Pin
Daniel Grunwald19-Nov-07 1:49
Daniel Grunwald19-Nov-07 1:49 
QuestionDictionary where the key is a combination of values? Pin
Rune Baess18-Nov-07 21:48
Rune Baess18-Nov-07 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.