DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 13 Aug 2007 06:40:03 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Mike
          2    Alexey Smirnov
          3    unknown
          4    Braulio Diez


Send Email   
Hi Guys,

I'm using this code to send an email with attachment but it's not working !!
So, what I'm missing!!? knowing that both From & To email addresses are 
correct?

MailMessage msgMail = new MailMessage();
msgMail.To = "badisrochdi@yahoo.com";
msgMail.From = "badisr@bigpond.com";
msgMail.Subject = "Attachment Test";
msgMail.BodyFormat = MailFormat.Text;
msgMail.Body = "Check out the attachment!";
msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
SmtpMail.Send(msgMail);
Response.Write("Email was queued to disk");


Thanks
-- 
Regards,
M.Rochdi
Date:Mon, 13 Aug 2007 06:40:03 -0700   Author:  

Re: Send Email   
On Aug 13, 3:40 pm, Mike  wrote:

> Hi Guys,
>
> I'm using this code to send an email with attachment but it's not working !!
> So, what I'm missing!!? knowing that both From & To email addresses are
> correct?
>
> MailMessage msgMail = new MailMessage();
> msgMail.To = "badisroc...@yahoo.com";
> msgMail.From = "bad...@bigpond.com";
> msgMail.Subject = "Attachment Test";
> msgMail.BodyFormat = MailFormat.Text;
> msgMail.Body = "Check out the attachment!";
> msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
> SmtpMail.Send(msgMail);
> Response.Write("Email was queued to disk");
>
> Thanks
> --
> Regards,
> M.Rochdi


is this working without attachment?
Date:Mon, 13 Aug 2007 06:47:46 -0700   Author:  

Re: Send Email   
Are your SMTP Server settings correct?

On Aug 13, 9:40 am, Mike  wrote:

> Hi Guys,
>
> I'm using this code to send an email with attachment but it's not working !!
> So, what I'm missing!!? knowing that both From & To email addresses are
> correct?
>
> MailMessage msgMail = new MailMessage();
> msgMail.To = "badisroc...@yahoo.com";
> msgMail.From = "bad...@bigpond.com";
> msgMail.Subject = "Attachment Test";
> msgMail.BodyFormat = MailFormat.Text;
> msgMail.Body = "Check out the attachment!";
> msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
> SmtpMail.Send(msgMail);
> Response.Write("Email was queued to disk");
>
> Thanks
> --
> Regards,
> M.Rochdi
Date:Mon, 13 Aug 2007 14:20:05 -0000   Author:  

Re: Send Email   
Hello,

First of all let's check if it's a problem of server/client configuration, 
or if it's .net code problem.

  Try to send an e-mail using the command line:


http://blog.avanadeadvisor.com/blogs/braulio_malaga/archive/2007/02/26/876.aspx

   Now, check if there are some security restrictions (E.g., authentication, 
or some times the "from" must have some well know domain name). Check as well 
if you SMTP server accepts calls from client computers (some time is just 
configured to work locally, it doesn't accept petitions from other computers 
to avoid spam).

   A good support material:

  .net fx 2.0
http://www.systemnetmail.com/

  .net fx 1.1
http://www.systemwebmail.com/

Good luck
   Braulio


/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------




"Alexey Smirnov" wrote:


> On Aug 13, 3:40 pm, Mike  wrote:
> > Hi Guys,
> >
> > I'm using this code to send an email with attachment but it's not working !!
> > So, what I'm missing!!? knowing that both From & To email addresses are
> > correct?
> >
> > MailMessage msgMail = new MailMessage();
> > msgMail.To = "badisroc...@yahoo.com";
> > msgMail.From = "bad...@bigpond.com";
> > msgMail.Subject = "Attachment Test";
> > msgMail.BodyFormat = MailFormat.Text;
> > msgMail.Body = "Check out the attachment!";
> > msgMail.Attachments.Add(new MailAttachment("c:\\report.pdf"));
> > SmtpMail.Send(msgMail);
> > Response.Write("Email was queued to disk");
> >
> > Thanks
> > --
> > Regards,
> > M.Rochdi
> 
> is this working without attachment?
> 
> 
Date:Mon, 13 Aug 2007 07:50:01 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us