Email Concept Using Asp.net with VB or C#

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2008
Posts: 15
Reputation: srvishnukumar is an unknown quantity at this point 
Solved Threads: 0
srvishnukumar srvishnukumar is offline Offline
Newbie Poster

Email Concept Using Asp.net with VB or C#

 
0
  #1
Jan 7th, 2009
Hi Friends

Wish U Happy New Year 2009

I Need Email sending Concept in asp.net

If possible sent me some notes about email concept and

sample codings....

Waiting for valuable Rply


Thanks with
vishnukumar SR
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 10
Reputation: AnilReddy is an unknown quantity at this point 
Solved Threads: 0
AnilReddy AnilReddy is offline Offline
Newbie Poster

Re: Email Concept Using Asp.net with VB or C#

 
0
  #2
Jan 7th, 2009
  1. using System.Net.Mail;
  2.  
  3. MailMessage msg = new MailMessage(strFrom, strTo, strSubject, strBody);
  4. SmtpClient cls = new SmtpClient("ur sys IP or n/w IP");
  5. Attachment atchmntn = new Attachment(abc/xyz....ur attachment);
  6. atchmntn.Name = "abc.jpg";
  7. msg.Attachments.Add(atchmntn);

You can use this code.

If u get any problem chk ur SMTP settings particularly Relay Restrictions settings....

Hope this helps you...

Regards
Anil Reddy
Last edited by peter_budo; Jan 11th, 2009 at 2:44 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 15
Reputation: srvishnukumar is an unknown quantity at this point 
Solved Threads: 0
srvishnukumar srvishnukumar is offline Offline
Newbie Poster

Re: Email Concept Using Asp.net with VB or C#

 
0
  #3
Jan 7th, 2009
Originally Posted by AnilReddy View Post
using System.Net.Mail;

MailMessage msg = new MailMessage(strFrom, strTo, strSubject, strBody);
SmtpClient cls = new SmtpClient("ur sys IP or n/w IP");
Attachment atchmntn = new Attachment(abc/xyz....ur attachment);
atchmntn.Name = "abc.jpg";
msg.Attachments.Add(atchmntn);

You can use this code.

If u get any problem chk ur SMTP settings particularly Relay Restrictions settings....

Hope this helps you...

Regards
Anil Reddy






HI Sir,

How Can I Create STMP Server ? Plz Explain me sir

regards,
vishnukumar SR
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 3
Reputation: Ramtamil is an unknown quantity at this point 
Solved Threads: 1
Ramtamil Ramtamil is offline Offline
Newbie Poster

Re: Email Concept Using Asp.net with VB or C#

 
0
  #4
Mar 20th, 2009
Hi

1)You can import system.net.mail

2) You can use this code
  1. Dim mm As New MailMessage(fromid, toid, subject, body)
  2. mm.IsBodyHtml = True
  3. Dim smtp As New SmtpClient
  4. smtp.Send(mm)

3)You can set the mail setting on WEB.CONFIG

  1. <system.net>
  2. <mailSettings>
  3. <smtp>
  4. <network host="localhost" port="23"/>
  5. </smtp>
  6. </mailSettings>
  7. </system.net>


I hope this is useful for you
Last edited by peter_budo; Mar 21st, 2009 at 3:26 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 370
Reputation: greeny_1984 is an unknown quantity at this point 
Solved Threads: 29
greeny_1984's Avatar
greeny_1984 greeny_1984 is offline Offline
Posting Whiz

Re: Email Concept Using Asp.net with VB or C#

 
0
  #5
Mar 23rd, 2009
hi,

you can use this code to send mails

  1. Sub sendmail()
  2. Dim msg As New MailMessage
  3. msg.From = txtEmail.Text
  4. msg.To = "info@yahoo.co.in"
  5. 'msg.To = "name1@yahoo.com"
  6. msg.Bcc = "name2@yahoo.co.in"
  7. msg.Subject = " Demo Info "
  8. msg.BodyFormat = MailFormat.Html
  9. Dim str As String
  10. msg.Body = mail(str)
  11. msg.Priority = MailPriority.High
  12. Try
  13. SmtpMail.SmtpServer = "localhost"
  14. SmtpMail.Send(msg)
  15. Catch ex As HttpException
  16. Catch ex As Exception
  17. Finally
  18. End Try
  19. End Sub
  20.  
If u r query is achieved,mark the thread as solved

Live and Let Live
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC