If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Adavnced Email App

Hi all,

I need to develop a small but rather advanced email app using vb.net
Up to now everything has been going smoothly until my lecturer asked me to include pictures in the email
I successfully managed to include the picture as attachment but he wanted the picture to be included in the email body itself and not as attachment
Now for 1 image I managed to do it by converting the email into html format and sending it
But now the real problem is when the user wishes to include several pictures in the email
How am i to detect the number of pictures and rewrite the equivalent email html??
I am using a richtextbox for the input of text and pictures

Re: Adavnced Email App

Originally Posted by Dhan17

Fanx for your reply
But my problem is not choosing multiple files
But rather once he has already chosen multiple files how to convert the rtf to html?

Actually, If you look closely at the code you posted, it only ever stores the LAST selected file, and while it may show all the selected files in the msg composition window, only the LAST selected one is attached to the sent msg...

Re: Adavnced Email App

The easiest method is to create a collection or list of attachments... example code below..

Code:

Public Class attachments
Private _ext As String
Private _path As String
Public Property ext() As String
Get
Return _ext
End Get
Set(ByVal value As String)
_ext = value
End Set
End Property
Public Property Path() As String
Get
Return _path
End Get
Set(ByVal value As String)
_path = value
End Set
End Property
End Class

now in your code...

Code:

Public Class Form1
'Dim picturePath As String
'Dim pictureExt As StringDim Picture as new list of attachments'Dim filePath As String = ""