Wrox Programmer Forums
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 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 January 29th, 2004, 01:32 AM
Authorized User
Join Date: Jan 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with sending mail

  i am facing a wierd problem.
in my application i have written a code to send mail with attachments.
problem is that sometimes the mail is sent and sometimes not.
i dont get any errors even when the mail is not sent.
it also happens that the same mail sent to 2-3 addresses is received on one address and not on others.
i dont know what is going wrong. what i feel is that if there is anything wrong with it should never send mail or to any address.
Is there any encoding of attachments to be done or so.
i am doing following things in my code:

    MailMessage myMailMsg = new MailMessage();
    myMailMsg.To = ToList;
    myMailMsg.From = mailid;
    myMailMsg.Cc = CcList;
        myMailMsg.Subject = subject;
    myMailMsg.Body = bodymsg;
    myMailMsg.BodyFormat = MailFormat.Html;


//the attachements are attached in a loop using the following code

MailAttachment MyAttachment = new MailAttachment(upfilepath);

//And send the mail using


The values come properly in myMailMsg object. i checked it through debugging.

please help me out.
Old January 29th, 2004, 08:29 AM
Authorized User
Join Date: Nov 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to koneruvijay

This problem occurs when the CC is not separated by semicolon.While attachment there is no need of encoding.In debug mode u better see whether multiple addresses are separated by semicolon or not.


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with sending e-mail Paula222 Pro PHP 1 July 27th, 2006 06:57 AM
Problem with sending mail in php Paula222 Beginning PHP 4 July 16th, 2006 03:38 PM
Problem sending SMTP mail Dsypher ASP.NET 2.0 Basics 3 February 16th, 2006 01:58 PM
Problem in sending an e-mail via ASP.NET Rashmi_Dubey ASP.NET 2.0 Basics 2 January 28th, 2006 03:36 AM
Sending mail problem!!!! NitinJoshi General .NET 2 January 13th, 2005 08:31 AM

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