Wrox Programmer Forums
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 July 1st, 2005, 04:20 AM
Authorized User
 
Join Date: Feb 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri
Default Mailing Program

Hello,

   Can anybody please verify the following progrm for sending mail and please tell me whether it is correct or not.

   I worked with it...But not working.

Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
        mailMessage.From =
"someone@someone.com"
        mailMessage.To = cmai
        mailMessage.Subject = "Thanks."
        mailMessage.BodyFormat = System.Web.Mail.MailFormat.Html
        mailMessage.Body = "Dear" & cnam & "<br><br>Thanks for Registering with us.<br>Your Username is:" & cmai & "<br> Password is:" & cpwd & "."
                System.Web.Mail.SmtpMail.SmtpServer = "mail.someone.com"
        System.Web.Mail.SmtpMail.Send(mailMessage)

    The Variables which i Specified in red colur are the variables i am getting the database.
 Thanks in Advance-Ashok Parchuri
 
Old July 1st, 2005, 04:22 AM
Authorized User
 
Join Date: Feb 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri
Default

Hey,

   I am sorry i forgot to specify.The from email address <"someone@someone.com">should be there in the server or we can give any mail address...?

   Please specify what is wrong...I Tried a lot But no use.

  -Ashok Parchuri
 
Old July 1st, 2005, 08:05 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you elaborate on "not working".

1) An exception is thrown
2) Process seems to work, but mail never shows up

-Peter
 
Old July 2nd, 2005, 01:31 AM
Authorized User
 
Join Date: Feb 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri
Default

hi,

Peter,
  thanks for your reply and the below is the message i am getting

 The server rejected one or more recipient addresses. The server response was: 550 <ashokparchuri@gmail.com> No such user here
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 <ashokparchuri@gmail.com> No such user here

Source Error:

Line 138: ' TODO: Set the mailMessage.Body property
Line 139: System.Web.Mail.SmtpMail.SmtpServer = "mail.someone.com"
Line 140: System.Web.Mail.SmtpMail.Send(mailMessage)
Line 141: 'Insert page code here
Line 142: 'Label1.Text = cnam



Please let me know what to do as soon as possible

Thanks-Ashok Parchuri
 
Old July 5th, 2005, 04:08 AM
Authorized User
 
Join Date: Feb 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri
Default

Hey...


   Could any body please help me...still i was unable to send mail through my server.

     Atleast could any body tell me what are possible causes for getting this error..

-Ashok Parchuri
 
Old July 5th, 2005, 04:16 AM
Authorized User
 
Join Date: Nov 2004
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to avanishp
Default

Hi

you have to check your smtp settings

in IIS, Open Properties of Default SMTP Server
Select Access Tab, Find Connection Ctrl Section -> Connection Button
Add IP 127.0.0.1 in Option -> Only the listed below, if its not already present.


Similarly, Find Relay Restriction on Access Tab -> Relay button
Add IP 127.0.0.1 in Option -> Only the listed below, if its not already present.

now set your System.Web.Mail.SmtpMail.SmtpServer ="localhost"

I think it will work for you

Avanish


 
Old July 9th, 2005, 01:30 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There's another thread that discusses mail sending, it might help you:

http://p2p.wrox.com/topic.asp?TOPIC_ID=4227

-Peter
 
Old October 27th, 2007, 06:51 AM
Authorized User
 
Join Date: Oct 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am sending email through thsi code but i am getting error given bleow please send me solution of this early

The server rejected one or more recipient addresses. The server response was: 550 No such user here

protected void Button1_Click(object sender, EventArgs e)
    {


        MailMessage M = new MailMessage();
        M.To = txtto.Text;
        M.From = "info@softindigo.com";
        M.Subject = txtsub.Text;
        M.Body = txtmess.Text;
        M.BodyFormat = MailFormat.Html;
        try
        {
            SmtpMail.SmtpServer = "mail.softindigo.com";
            SmtpMail.Send(M);
            Response.Write("mail send sucessfully");
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        }
}


 
Old October 27th, 2007, 06:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Have you looked at the error message? What do you think it's telling you?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old October 27th, 2007, 07:03 AM
Authorized User
 
Join Date: Oct 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello sir i am raghuvar i am getting error

Error=>"The server rejected one or more recipient addresses. The server response was: 550 No such user here".

MailMessage M = new MailMessage();
        M.To = "raghuvarbisht@gmail.com";
        M.From = "info@softindigo.com";
        M.Subject = "hello ragghuvar";
        M.Body = "how are you raghuvar what are you doing";
        M.BodyFormat = MailFormat.Html;
        try
        {
            SmtpMail.SmtpServer = "mail.softindigo.com";
            SmtpMail.Send(M);
            Response.Write("mail send sucessfully");
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        }





Similar Threads
Thread Thread Starter Forum Replies Last Post
mailing manish_partey ASP.NET 1.0 and 1.1 Professional 1 April 25th, 2007 08:20 AM
Mailing prashanth_kumarbv Classic ASP Basics 2 October 27th, 2006 08:40 PM
E-mailing reports Brendan Bartley Access 5 June 26th, 2006 01:37 PM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
SMTP not mailing...help! c_bananas .NET Web Services 5 November 17th, 2003 01:28 PM





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