Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2006, 03:17 AM
Registered User
 
Join Date: Aug 2006
Location: Chennai, Tamilnadu, .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Send Message to Email

string eMailSrvIP = System.Configuration.ConfigurationSettings.AppSett ings["eMailServerIP"];
            MailMessage objEmail =new MailMessage();
            objEmail.To = "Ex@yahoo.com";
            objEmail.From = "Ex2@yahoo.com";
            objEmail.Bcc = "inbaa@yahoo.com";
            objEmail.Subject = "Example12";
            objEmail.Body = "Exampe Message12";
            objEmail.Priority = MailPriority.High;
            SmtpMail.SmtpServer ="localhost";//"127.0.0.1";//(or)eMailSrvIP;

            try
            {

                    SmtpMail.Send(objEmail);
                    Response.Write("<p><strong> The Mail has been sent: </strong></p>");


            }
            catch (Exception exc)
            {
                System.Console.WriteLine(exc.Message);
                Response.Write(exc.Message);

            }

this is code include in my projects.No errors in a Page, Display result also shows the mail has been sent but not received in my email id ....
kindly clarify and give me a right solution .

Inbaa
 
Old August 28th, 2006, 03:42 AM
Registered User
 
Join Date: Aug 2006
Location: Mehsana, Gujarat, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hpatel_it Send a message via Yahoo to hpatel_it
Default

Hi,

Please mention BodyFormat of email that you can send.

its look like.. objEmail.BodyFormat = MailFormat.HTML;

and check out www.systemwebmail.com site for further clarification.

Thanks,
Hiren Patel
 
Old August 28th, 2006, 05:45 AM
Registered User
 
Join Date: Aug 2006
Location: Chennai, Tamilnadu, .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think errors not in code,its may be in SMTP server.Eventhough i configured relay restrictions in SMTP Server and given IP is 127.0.0.1. Clarify about to configure server(i.e if any modifications will do in SMTP server to send email )

Inbaa




Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA - Send email with html message body elad Excel VBA 1 July 16th, 2007 03:28 PM
send message to many recipients eda BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 0 May 29th, 2006 08:49 PM
how to send HTML email by using CDO.Message ittech Classic ASP Basics 2 January 10th, 2006 06:49 PM
How to send HTML email by using CDO.Message ittech Classic ASP Components 1 January 10th, 2006 06:48 PM
How to send message to SMS !!!!! stevenThu Classic ASP Professional 4 August 26th, 2004 10:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.