| | |
Email Concept Using Asp.net with VB or C#
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 10
Reputation:
Solved Threads: 0
asp.net Syntax (Toggle Plain Text)
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
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.
•
•
Join Date: Aug 2008
Posts: 15
Reputation:
Solved Threads: 0
•
•
•
•
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
•
•
Join Date: Mar 2009
Posts: 3
Reputation:
Solved Threads: 1
Hi
1)You can import system.net.mail
2) You can use this code
3)You can set the mail setting on WEB.CONFIG
I hope this is useful for you
1)You can import system.net.mail
2) You can use this code
ASP.NET Syntax (Toggle Plain Text)
Dim mm As New MailMessage(fromid, toid, subject, body) mm.IsBodyHtml = True Dim smtp As New SmtpClient smtp.Send(mm)
3)You can set the mail setting on WEB.CONFIG
xml Syntax (Toggle Plain Text)
<system.net> <mailSettings> <smtp> <network host="localhost" port="23"/> </smtp> </mailSettings> </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.
hi,
you can use this code to send mails
you can use this code to send mails
ASP.NET Syntax (Toggle Plain Text)
Sub sendmail() Dim msg As New MailMessage msg.From = txtEmail.Text msg.To = "info@yahoo.co.in" 'msg.To = "name1@yahoo.com" msg.Bcc = "name2@yahoo.co.in" msg.Subject = " Demo Info " msg.BodyFormat = MailFormat.Html Dim str As String msg.Body = mail(str) msg.Priority = MailPriority.High Try SmtpMail.SmtpServer = "localhost" SmtpMail.Send(msg) Catch ex As HttpException Catch ex As Exception Finally End Try End Sub
If u r query is achieved,mark the thread as solved
Live and Let Live
Live and Let Live
![]() |
Similar Threads
- C# server.transfer to save form data and send email (ASP.NET)
- Project idea ! ! (VB.NET)
- need help (ASP.NET)
- Team Lead C#, ASP.NET, VB.NET, Web Services, SQL - Los Angeles, CA (Web Development Job Offers)
- What is Your Opinion About Microsofts OS (Windows Software)
- Microsoft .NET FAQ (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: form execution
- Next Thread: Access key to <OBJECT>
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose feedback flash flv form formatdecimal forms formview gridview homeedition hosting iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt webservice xml youareanotmemberofthedebuggerusers





