473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Sending email with attachments

I need to send an email with vb.net and I must be able to include multiple
attachments. When I use mailmessage, it says that the "To" is read only.
Any help?
Sep 25 '06 #1
4 1477
Might want to take a look at this in the help system:
System.Web.Mail
"Mark" <Ma**@discussions.microsoft.comwrote in message
news:DE**********************************@microsof t.com...
>I need to send an email with vb.net and I must be able to include multiple
attachments. When I use mailmessage, it says that the "To" is read only.
Any help?

Sep 25 '06 #2
Or, look here too:

http://www.codeproject.com/vb/net/SendMail.asp
HTH

Steve

"Mark" <Ma**@discussions.microsoft.comwrote in message
news:DE**********************************@microsof t.com...
>I need to send an email with vb.net and I must be able to include multiple
attachments. When I use mailmessage, it says that the "To" is read only.
Any help?

Sep 25 '06 #3
Got any ideas for more of a novice?

"Steve Long" wrote:
Might want to take a look at this in the help system:
System.Web.Mail
"Mark" <Ma**@discussions.microsoft.comwrote in message
news:DE**********************************@microsof t.com...
I need to send an email with vb.net and I must be able to include multiple
attachments. When I use mailmessage, it says that the "To" is read only.
Any help?


Sep 25 '06 #4

I can't see the original post, but if you looking for code to send
email with attachments it's quite simple.

************************************************** ********************

Private Sub SendEmail(ByVal Path As String, ByVal Too As String,
Optional ByVal Body As String = "")

Dim SendMessage As New SmtpClient
Dim Message As MailMessage = New
MailMessage(My.Settings.EmailFrom, Too, "EDI Transfer Report", Body)
Dim App As Attachment

If Path.Length 0 And File.Exists(Path) Then
App = New Attachment(Path)
Message.Attachments.Add(App)
End If

SendMessage.Host = My.Settings.EmailServer
SendMessage.Send(Message)

End Sub

************************************************** ***********************

Mark wrote:
Got any ideas for more of a novice?

"Steve Long" wrote:
Might want to take a look at this in the help system:
System.Web.Mail
"Mark" <Ma**@discussions.microsoft.comwrote in message
news:DE**********************************@microsof t.com...
>I need to send an email with vb.net and I must be able to include multiple
attachments. When I use mailmessage, it says that the "To" is read only.
Any help?
Sep 25 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
5
by: morphex | last post by:
Hi, I have an email that's in the utf-8 encoding, and I'm getting this error message when I try to send it using smtplib: * Module smtplib, line 688, in sendmail * Module smtplib, line 485,...
4
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> System.Web.HttpException: Could not access 'CDO.Message' object. --->...
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
7
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the...
3
by: lizii | last post by:
Hey there - hopefully last newbie question i will ask for a while! I want my application to work where you click a button - and it either: a) open a email application - insert the correct email...
2
by: Aneesh Pulukkul[MCSD.Net] | last post by:
Hi, I have a HTML page and associated images. I need to send the HTML as email -the email should also display the images at respective places. So am sending the content of HTML file as...
7
by: Paridevi | last post by:
Hai , i want to send email in .Net Using OutLook Express,My Project is Web Application using vb.Net 2003 with SQL Server 2000.I have searched a lot in Google, but ican't get any...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
3
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.