Re: Email Programming using System.Web.Mail
- From: "Thomas Weise" <thomas@xxxxxxxxxxxxxxxx>
- Date: Wed, 16 Jan 2008 20:26:26 +0100
Ed,
This is how I attach files to eMails sent via System.Net.Mail:
Private Sub AddAttachment(ByRef message As MailMessage, ByVal sFile As
String)
Dim attFile As Attachment
Dim disposition As ContentDisposition
attFile = New Attachment(sFile)
disposition = attFile.ContentDisposition
disposition.CreationDate = System.IO.File.GetCreationTime(sFile)
disposition.ModificationDate =
System.IO.File.GetLastWriteTime(sFile)
disposition.ReadDate = System.IO.File.GetLastAccessTime(sFile)
message.Attachments.Add(attFile)
End Sub
The MailMessage object does have a Bcc property, so you can add Bcc adresses
(don't know how many):
Dim adrBcc As MailAddress
adrBcc = New MailAddress("add1@xxxxxxxx")
message.Bcc.Add(adrBcc)
adrBcc = New MailAddress("add2@xxxxxxxx")
message.Bcc.Add(adrBcc)
...
Hope this helps,
Thomas
"Ed Bitzer" <edbitzer@xxxxxxxxx> schrieb im Newsbeitrag
news:u03VHQGWIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
I have been able using the namespace System.Web.Mail and its method
Smtp.mail.send to mail simple text messages to a small group within
our 55 and older community. I need help expanding the programs
capabilities. Searching this forum I did not find any related
information so if I have chosen poorly, I would appreciate a
suggestion of a more appropriate dotnet forum.
Now what I wish is the ability to send bcc's rather than to: (would be
sending to all 250 residents and would have to send in groups of 50 as
required by Comcast to curtail spammers) and also wonder if this
namespace handles base64 encoding so that I can send a pdf attachment.
Appreciate,
Ed
.
- Follow-Ups:
- Re: Email Programming using System.Web.Mail
- From: Thomas Weise
- Re: Email Programming using System.Web.Mail
- References:
- Email Programming using System.Web.Mail
- From: Ed Bitzer
- Email Programming using System.Web.Mail
- Prev by Date: C# / VB.NET inline namespaces, how can I do: New System.Windows.Forms.MessageBox?
- Next by Date: Re: I created a Hello World webservice-published it - how to call
- Previous by thread: Re: Email Programming using System.Web.Mail
- Next by thread: Re: Email Programming using System.Web.Mail
- Index(es):
Relevant Pages
|
Loading