I have an email programme that works sometimes, but mostly comes up with a general Mapi failure. I am at a loss as to the reason, but it may be a good idea to not use the mapi controls anymore if it is going to cause errors. I have looked at SMTP options using system.net.mail but I cant figure out how to send attachments, also it is nice to have a copy of the email in the default mail client which MAPI does. Anyone got any ideas as the best way to send emails using vb.net.
UKnod
16
Newbie Poster
Recommended Answers
Jump to PostYou can add an attachment to an email by doing the following:
Dim oMail As New Net.Mail.MailMessage oMail.Attachments.Add(New Net.Mail.Attachment("Path to my file"))
As for saving a copy local, you could parse the email into a text file and save it.
Jump to PostWhat mail client are you using?
Outlook?
Mozilla?
Live?
All 7 Replies
Begginnerdev
256
Junior Poster
UKnod
16
Newbie Poster
Begginnerdev
256
Junior Poster
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
Begginnerdev
256
Junior Poster
UKnod
16
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.