Board index » Visual Studio » MAPI and e-mail

MAPI and e-mail

Visual Studio181
I'm using the code below to send newsletters via the MAPI control (I

couldn't find the MAPI API). Now, it inserts plain text fine as the standard

body, but I want to insert the text into the actual "source" of the e-mail.

(thus allowing HTML e-mail aswell as plain text).



Anyone have any ideas?.



--Module code

Dim i As Long

For i = 0 To frmLeft.List1.ListCount - 1

MDIForm1.MS.NewSession = True

MDIForm1.MS.Action = 1

MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

MDIForm1.MM.Compose

MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

frmHF.txtNumber.Text

MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

MDIForm1.MM.Send

MDIForm1.MS.Action = 2

Next

'End Module code



Btw, apologies if the code above looks a tad messy but, I want to get it

working before I bother tidying it up.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.


-
 

Re:MAPI and e-mail

mapi's crap. Just automate outlook.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

Quote
I'm using the code below to send newsletters via the MAPI control (I

couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

body, but I want to insert the text into the actual "source" of the

e-mail.

(thus allowing HTML e-mail aswell as plain text).



Anyone have any ideas?.



--Module code

Dim i As Long

For i = 0 To frmLeft.List1.ListCount - 1

MDIForm1.MS.NewSession = True

MDIForm1.MS.Action = 1

MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

MDIForm1.MM.Compose

MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

frmHF.txtNumber.Text

MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

MDIForm1.MM.Send

MDIForm1.MS.Action = 2

Next

'End Module code



Btw, apologies if the code above looks a tad messy but, I want to get it

working before I bother tidying it up.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.











-

Re:MAPI and e-mail

You don't need to put in a disclaimer if you're not from Microsoft.

The whole point of having multiple people answer messages is based on the

assumption that no one answer is assumed to be THE correct one.

If people criticise you then either take it as constructive, or just assume

that it's because they're argumentative.

It's all too easy to believe that it's all 'official' and that you 'need to

watch you don't lead people up the garden path'. Just have a go! If you

don't know the answer but you've got a suggestion that MIGHT work, then what

the hell, bash it out anyway! The OP would sure prefer it to nothing. If

you're *completely* wrong, then you've probably done everyone a favour, as

the OP has got something they'll have to work on and will learn something,

and the stuffies will probably enjoy shooting you down.

These newsgroups aren't in any way 'owned' by the people who like to make

themselves out to be the most experienced posters, nor do these people have

the right to moderate them, even if they do manage to convince some people

of such fallacy with their tone.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

Quote
I'm using the code below to send newsletters via the MAPI control (I

couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

body, but I want to insert the text into the actual "source" of the

e-mail.

(thus allowing HTML e-mail aswell as plain text).



Anyone have any ideas?.



--Module code

Dim i As Long

For i = 0 To frmLeft.List1.ListCount - 1

MDIForm1.MS.NewSession = True

MDIForm1.MS.Action = 1

MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

MDIForm1.MM.Compose

MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

frmHF.txtNumber.Text

MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

MDIForm1.MM.Send

MDIForm1.MS.Action = 2

Next

'End Module code



Btw, apologies if the code above looks a tad messy but, I want to get it

working before I bother tidying it up.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.











-

Re:MAPI and e-mail

That's helpful.



"Frampton Firesword" <f_firesword@nospam_hotmail.com>wrote in message

Quote
mapi's crap. Just automate outlook.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>I'm using the code below to send newsletters via the MAPI control (I

>couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

>body, but I want to insert the text into the actual "source" of the

e-mail.

>(thus allowing HTML e-mail aswell as plain text).

>

>Anyone have any ideas?.

>

>--Module code

>Dim i As Long

>For i = 0 To frmLeft.List1.ListCount - 1

>MDIForm1.MS.NewSession = True

>MDIForm1.MS.Action = 1

>MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

>MDIForm1.MM.Compose

>MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

>frmHF.txtNumber.Text

>MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

>MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

>MDIForm1.MM.Send

>MDIForm1.MS.Action = 2

>Next

>'End Module code

>

>Btw, apologies if the code above looks a tad messy but, I want to get it

>working before I bother tidying it up.

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because I tell you

>something, does not mean I am right.

>

>

>









-

Re:MAPI and e-mail

The disclaimer is meant as a little humerous, not something to be taken

seriously.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Frampton Firesword <f_firesword@nospam_hotmail.com>wrote in message

Quote
You don't need to put in a disclaimer if you're not from Microsoft.

The whole point of having multiple people answer messages is based on the

assumption that no one answer is assumed to be THE correct one.

If people criticise you then either take it as constructive, or just

assume

that it's because they're argumentative.

It's all too easy to believe that it's all 'official' and that you 'need

to

watch you don't lead people up the garden path'. Just have a go! If you

don't know the answer but you've got a suggestion that MIGHT work, then

what

the hell, bash it out anyway! The OP would sure prefer it to nothing. If

you're *completely* wrong, then you've probably done everyone a favour, as

the OP has got something they'll have to work on and will learn something,

and the stuffies will probably enjoy shooting you down.

These newsgroups aren't in any way 'owned' by the people who like to make

themselves out to be the most experienced posters, nor do these people

have

the right to moderate them, even if they do manage to convince some people

of such fallacy with their tone.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>I'm using the code below to send newsletters via the MAPI control (I

>couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

>body, but I want to insert the text into the actual "source" of the

e-mail.

>(thus allowing HTML e-mail aswell as plain text).

>

>Anyone have any ideas?.

>

>--Module code

>Dim i As Long

>For i = 0 To frmLeft.List1.ListCount - 1

>MDIForm1.MS.NewSession = True

>MDIForm1.MS.Action = 1

>MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

>MDIForm1.MM.Compose

>MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

>frmHF.txtNumber.Text

>MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

>MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

>MDIForm1.MM.Send

>MDIForm1.MS.Action = 2

>Next

>'End Module code

>

>Btw, apologies if the code above looks a tad messy but, I want to get it

>working before I bother tidying it up.

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because I tell you

>something, does not mean I am right.

>

>

>









-

Re:MAPI and e-mail

Not useful unless everyone that uses it, has Outlook installed.



I'd rather find a way to get it working for those with and without MAPI (for

example, AOL users).



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Frampton Firesword <f_firesword@nospam_hotmail.com>wrote in message

Quote
mapi's crap. Just automate outlook.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>I'm using the code below to send newsletters via the MAPI control (I

>couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

>body, but I want to insert the text into the actual "source" of the

e-mail.

>(thus allowing HTML e-mail aswell as plain text).

>

>Anyone have any ideas?.

>

>--Module code

>Dim i As Long

>For i = 0 To frmLeft.List1.ListCount - 1

>MDIForm1.MS.NewSession = True

>MDIForm1.MS.Action = 1

>MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

>MDIForm1.MM.Compose

>MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

>frmHF.txtNumber.Text

>MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

>MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

>MDIForm1.MM.Send

>MDIForm1.MS.Action = 2

>Next

>'End Module code

>

>Btw, apologies if the code above looks a tad messy but, I want to get it

>working before I bother tidying it up.

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because I tell you

>something, does not mean I am right.

>

>

>









-

Re:MAPI and e-mail

MAPI 1, used with VB, does not support HTML messages. You can place a

html-coded message into an email but it will be just that ... a html-coded

message in an email. It will not appear in HTML since the required headers

for HTML translation are not inserted by the client.



--



Randy Birch

MVP Visual Basic

www.mvps.org/vbnet/">www.mvps.org/vbnet/

Please respond only to the newsgroups so all can benefit.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

: I'm using the code below to send newsletters via the MAPI control (I

: couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

: body, but I want to insert the text into the actual "source" of the

e-mail.

: (thus allowing HTML e-mail aswell as plain text).

:

: Anyone have any ideas?.

:

: --Module code

: Dim i As Long

: For i = 0 To frmLeft.List1.ListCount - 1

: MDIForm1.MS.NewSession = True

: MDIForm1.MS.Action = 1

: MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

: MDIForm1.MM.Compose

: MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

: frmHF.txtNumber.Text

: MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

: MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

: MDIForm1.MM.Send

: MDIForm1.MS.Action = 2

: Next

: 'End Module code

:

: Btw, apologies if the code above looks a tad messy but, I want to get it

: working before I bother tidying it up.

:

: --

: Regards

:

: Steven Burn

: Ur I.T. Mate Group CEO

: www.it-mate.co.uk

:

: Disclaimer:

: My advice is provided on an 'as-is' basis. Just because I tell you

: something, does not mean I am right.

:

:

:





-

Re:MAPI and e-mail

Woops, meant to put with and without Outlook, not MAPI



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Steven Burn <ceo@PVT_it-mate.co.uk>wrote in message

Quote
Not useful unless everyone that uses it, has Outlook installed.



I'd rather find a way to get it working for those with and without MAPI

(for

example, AOL users).



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Frampton Firesword <f_firesword@nospam_hotmail.com>wrote in message

news:OJoeb6ghDHA.3616@TK2MSFTNGP11.phx.gbl...

>mapi's crap. Just automate outlook.

>

>

>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

>news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>>I'm using the code below to send newsletters via the MAPI control (I

>>couldn't find the MAPI API). Now, it inserts plain text fine as the

>standard

>>body, but I want to insert the text into the actual "source" of the

>e-mail.

>>(thus allowing HTML e-mail aswell as plain text).

>>

>>Anyone have any ideas?.

>>

>>--Module code

>>Dim i As Long

>>For i = 0 To frmLeft.List1.ListCount - 1

>>MDIForm1.MS.NewSession = True

>>MDIForm1.MS.Action = 1

>>MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

>>MDIForm1.MM.Compose

>>MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

>>frmHF.txtNumber.Text

>>MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

>>MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

>>MDIForm1.MM.Send

>>MDIForm1.MS.Action = 2

>>Next

>>'End Module code

>>

>>Btw, apologies if the code above looks a tad messy but, I want to get

it

>>working before I bother tidying it up.

>>

>>--

>>Regards

>>

>>Steven Burn

>>Ur I.T. Mate Group CEO

>>www.it-mate.co.uk

>>

>>Disclaimer:

>>My advice is provided on an 'as-is' basis. Just because I tell you

>>something, does not mean I am right.

>>

>>

>>

>

>









-

Re:MAPI and e-mail

Any reccomendations on the best to use? (I don't want to use Shell or

ShellExecute if I can help it).



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Randy Birch <rgb at mvps dot org>wrote in message

Quote
MAPI 1, used with VB, does not support HTML messages. You can place a

html-coded message into an email but it will be just that ... a html-coded

message in an email. It will not appear in HTML since the required headers

for HTML translation are not inserted by the client.



--



Randy Birch

MVP Visual Basic

www.mvps.org/vbnet/">www.mvps.org/vbnet/

Please respond only to the newsgroups so all can benefit.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:#3euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

: I'm using the code below to send newsletters via the MAPI control (I

: couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

: body, but I want to insert the text into the actual "source" of the

e-mail.

: (thus allowing HTML e-mail aswell as plain text).

:

: Anyone have any ideas?.

:

: --Module code

: Dim i As Long

: For i = 0 To frmLeft.List1.ListCount - 1

: MDIForm1.MS.NewSession = True

: MDIForm1.MS.Action = 1

: MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

: MDIForm1.MM.Compose

: MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

: frmHF.txtNumber.Text

: MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

: MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

: MDIForm1.MM.Send

: MDIForm1.MS.Action = 2

: Next

: 'End Module code

:

: Btw, apologies if the code above looks a tad messy but, I want to get it

: working before I bother tidying it up.

:

: --

: Regards

:

: Steven Burn

: Ur I.T. Mate Group CEO

: www.it-mate.co.uk

:

: Disclaimer:

: My advice is provided on an 'as-is' basis. Just because I tell you

: something, does not mean I am right.

:

:

:









-

Re:MAPI and e-mail

hmm ... guess that depends on what you're prepared to put up with. CDONTS is

one option, though I'm unsure of how HTML is supported. There may also be

minimum system requirements.



Automating Outlook is another, if you're prepared to a) dismiss the dialog

asking if its OK for another app to access the program, b) ensure Outlook is

installed on the sending machine, and c) like using CreateObject.



Using SMTP directly - not sure if that supports HTML directly -- the client

may need to be prepared to write the proper mime-type signatures to the

message.



ShellExecute can send large emails easily if the default client can be set

to outlook express, but I don't believe just adding the mime headers and

html to the text actually constitutes an HTML message using this option.



How about trying some of the mail programs/ocxs/dlls around, such as

Mabry's?



--



Randy Birch

MVP Visual Basic

www.mvps.org/vbnet/">www.mvps.org/vbnet/

Please respond only to the newsgroups so all can benefit.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

: Any reccomendations on the best to use? (I don't want to use Shell or

: ShellExecute if I can help it).

:

: --

: Regards

:

: Steven Burn

: Ur I.T. Mate Group CEO

: www.it-mate.co.uk

:

: Disclaimer:

: My advice is provided on an 'as-is' basis. Just because I tell you

: something, does not mean I am right.

:

:

: Randy Birch <rgb at mvps dot org>wrote in message

: news:ucXZNQhhDHA.1340@tk2msftngp13.phx.gbl...

:>MAPI 1, used with VB, does not support HTML messages. You can place a

:>html-coded message into an email but it will be just that ... a

html-coded

:>message in an email. It will not appear in HTML since the required

headers

:>for HTML translation are not inserted by the client.

:>

:>--

:>

:>Randy Birch

:>MVP Visual Basic

:>www.mvps.org/vbnet/">www.mvps.org/vbnet/

:>Please respond only to the newsgroups so all can benefit.

:>

:>

:>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

:>news:#3euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

:>: I'm using the code below to send newsletters via the MAPI control (I

:>: couldn't find the MAPI API). Now, it inserts plain text fine as the

:>standard

:>: body, but I want to insert the text into the actual "source" of the

:>e-mail.

:>: (thus allowing HTML e-mail aswell as plain text).

:>:

:>: Anyone have any ideas?.

:>:

:>: --Module code

:>: Dim i As Long

:>: For i = 0 To frmLeft.List1.ListCount - 1

:>: MDIForm1.MS.NewSession = True

:>: MDIForm1.MS.Action = 1

:>: MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

:>: MDIForm1.MM.Compose

:>: MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

:>: frmHF.txtNumber.Text

:>: MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

:>: MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

:>: MDIForm1.MM.Send

:>: MDIForm1.MS.Action = 2

:>: Next

:>: 'End Module code

:>:

:>: Btw, apologies if the code above looks a tad messy but, I want to get

it

:>: working before I bother tidying it up.

:>:

:>: --

:>: Regards

:>:

:>: Steven Burn

:>: Ur I.T. Mate Group CEO

:>: www.it-mate.co.uk

:>:

:>: Disclaimer:

:>: My advice is provided on an 'as-is' basis. Just because I tell you

:>: something, does not mean I am right.

:>:

:>:

:>:

:>

:>

:

:





-

Re:MAPI and e-mail

"How about trying some of the mail programs/ocxs/dlls around, such as

Mabry's?"



Mabry's?



I've tried vbSendMail.dll without luck (couldn't get it to work on my 98se

system, just crashed the IDE).



I originally used ShellExecute, but that requires you send the mails

manually (I couldn't get it to automate, even with SW_HIDE).



I was considering Winsock, but not sure whether to or not.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Randy Birch <rgb at mvps dot org>wrote in message

Quote
hmm ... guess that depends on what you're prepared to put up with. CDONTS

is

one option, though I'm unsure of how HTML is supported. There may also be

minimum system requirements.



Automating Outlook is another, if you're prepared to a) dismiss the dialog

asking if its OK for another app to access the program, b) ensure Outlook

is

installed on the sending machine, and c) like using CreateObject.



Using SMTP directly - not sure if that supports HTML directly -- the

client

may need to be prepared to write the proper mime-type signatures to the

message.



ShellExecute can send large emails easily if the default client can be set

to outlook express, but I don't believe just adding the mime headers and

html to the text actually constitutes an HTML message using this option.



How about trying some of the mail programs/ocxs/dlls around, such as

Mabry's?



--



Randy Birch

MVP Visual Basic

www.mvps.org/vbnet/">www.mvps.org/vbnet/

Please respond only to the newsgroups so all can benefit.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:OvQPRbhhDHA.3204@TK2MSFTNGP11.phx.gbl...

: Any reccomendations on the best to use? (I don't want to use Shell or

: ShellExecute if I can help it).

:

: --

: Regards

:

: Steven Burn

: Ur I.T. Mate Group CEO

: www.it-mate.co.uk

:

: Disclaimer:

: My advice is provided on an 'as-is' basis. Just because I tell you

: something, does not mean I am right.

:

:

: Randy Birch <rgb at mvps dot org>wrote in message

: news:ucXZNQhhDHA.1340@tk2msftngp13.phx.gbl...

:>MAPI 1, used with VB, does not support HTML messages. You can place a

:>html-coded message into an email but it will be just that ... a

html-coded

:>message in an email. It will not appear in HTML since the required

headers

:>for HTML translation are not inserted by the client.

:>

:>--

:>

:>Randy Birch

:>MVP Visual Basic

:>www.mvps.org/vbnet/">www.mvps.org/vbnet/

:>Please respond only to the newsgroups so all can benefit.

:>

:>

:>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

:>news:#3euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

:>: I'm using the code below to send newsletters via the MAPI control (I

:>: couldn't find the MAPI API). Now, it inserts plain text fine as the

:>standard

:>: body, but I want to insert the text into the actual "source" of the

:>e-mail.

:>: (thus allowing HTML e-mail aswell as plain text).

:>:

:>: Anyone have any ideas?.

:>:

:>: --Module code

:>: Dim i As Long

:>: For i = 0 To frmLeft.List1.ListCount - 1

:>: MDIForm1.MS.NewSession = True

:>: MDIForm1.MS.Action = 1

:>: MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

:>: MDIForm1.MM.Compose

:>: MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #"

&

:>: frmHF.txtNumber.Text

:>: MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

:>: MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

:>: MDIForm1.MM.Send

:>: MDIForm1.MS.Action = 2

:>: Next

:>: 'End Module code

:>:

:>: Btw, apologies if the code above looks a tad messy but, I want to

get

it

:>: working before I bother tidying it up.

:>:

:>: --

:>: Regards

:>:

:>: Steven Burn

:>: Ur I.T. Mate Group CEO

:>: www.it-mate.co.uk

:>:

:>: Disclaimer:

:>: My advice is provided on an 'as-is' basis. Just because I tell you

:>: something, does not mean I am right.

:>:

:>:

:>:

:>

:>

:

:









-

Re:MAPI and e-mail

Just wanted to let you guys know, I've found a seriously cool alternative to

winsock, MAPI, etc etc etc.



Called SMTP Control and is available freely from: www.ostrosoft.com/">www.ostrosoft.com/



Supports HTML, plain text, attatchments



From the authors site:



"SMTP.ocx is a Visual Basic library, allowing programmers to send emails.

SMTP.ocx is fully SMTP RFC-compliant and provides support for basic

authentication, binary (MIME) attachments and HTML email. SMTP.ocx is

distributed as freeware (as is, with limited technical support) and is free

for use in any type of application (personal, open-source, commercial,

etc.)."



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Randy Birch <rgb at mvps dot org>wrote in message

Quote
hmm ... guess that depends on what you're prepared to put up with. CDONTS

is

one option, though I'm unsure of how HTML is supported. There may also be

minimum system requirements.



Automating Outlook is another, if you're prepared to a) dismiss the dialog

asking if its OK for another app to access the program, b) ensure Outlook

is

installed on the sending machine, and c) like using CreateObject.



Using SMTP directly - not sure if that supports HTML directly -- the

client

may need to be prepared to write the proper mime-type signatures to the

message.



ShellExecute can send large emails easily if the default client can be set

to outlook express, but I don't believe just adding the mime headers and

html to the text actually constitutes an HTML message using this option.



How about trying some of the mail programs/ocxs/dlls around, such as

Mabry's?



--



Randy Birch

MVP Visual Basic

www.mvps.org/vbnet/">www.mvps.org/vbnet/

Please respond only to the newsgroups so all can benefit.





"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:OvQPRbhhDHA.3204@TK2MSFTNGP11.phx.gbl...

: Any reccomendations on the best to use? (I don't want to use Shell or

: ShellExecute if I can help it).

:

: --

: Regards

:

: Steven Burn

: Ur I.T. Mate Group CEO

: www.it-mate.co.uk

:

: Disclaimer:

: My advice is provided on an 'as-is' basis. Just because I tell you

: something, does not mean I am right.

:

:

: Randy Birch <rgb at mvps dot org>wrote in message

: news:ucXZNQhhDHA.1340@tk2msftngp13.phx.gbl...

:>MAPI 1, used with VB, does not support HTML messages. You can place a

:>html-coded message into an email but it will be just that ... a

html-coded

:>message in an email. It will not appear in HTML since the required

headers

:>for HTML translation are not inserted by the client.

:>

:>--

:>

:>Randy Birch

:>MVP Visual Basic

:>www.mvps.org/vbnet/">www.mvps.org/vbnet/

:>Please respond only to the newsgroups so all can benefit.

:>

:>

:>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

:>news:#3euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

:>: I'm using the code below to send newsletters via the MAPI control (I

:>: couldn't find the MAPI API). Now, it inserts plain text fine as the

:>standard

:>: body, but I want to insert the text into the actual "source" of the

:>e-mail.

:>: (thus allowing HTML e-mail aswell as plain text).

:>:

:>: Anyone have any ideas?.

:>:

:>: --Module code

:>: Dim i As Long

:>: For i = 0 To frmLeft.List1.ListCount - 1

:>: MDIForm1.MS.NewSession = True

:>: MDIForm1.MS.Action = 1

:>: MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

:>: MDIForm1.MM.Compose

:>: MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #"

&

:>: frmHF.txtNumber.Text

:>: MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

:>: MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

:>: MDIForm1.MM.Send

:>: MDIForm1.MS.Action = 2

:>: Next

:>: 'End Module code

:>:

:>: Btw, apologies if the code above looks a tad messy but, I want to

get

it

:>: working before I bother tidying it up.

:>:

:>: --

:>: Regards

:>:

:>: Steven Burn

:>: Ur I.T. Mate Group CEO

:>: www.it-mate.co.uk

:>:

:>: Disclaimer:

:>: My advice is provided on an 'as-is' basis. Just because I tell you

:>: something, does not mean I am right.

:>:

:>:

:>:

:>

:>

:

:









-

Re:MAPI and e-mail

Good, that's what we need to see



Quote
-----Original Message-----

The disclaimer is meant as a little humerous, not

something to be taken

seriously.



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I

tell you

something, does not mean I am right.





Frampton Firesword <f_firesword@nospam_hotmail.com>wrote

in message

news:#mxKD#ghDHA.2452@TK2MSFTNGP10.phx.gbl...

>You don't need to put in a disclaimer if you're not

from Microsoft.

>The whole point of having multiple people answer

messages is based on the

>assumption that no one answer is assumed to be THE

correct one.

>If people criticise you then either take it as

constructive, or just

assume

>that it's because they're argumentative.

>It's all too easy to believe that it's all 'official'

and that you 'need

to

>watch you don't lead people up the garden path'. Just

have a go! If you

>don't know the answer but you've got a suggestion that

MIGHT work, then

what

>the hell, bash it out anyway! The OP would sure prefer

it to nothing. If

>you're *completely* wrong, then you've probably done

everyone a favour, as

>the OP has got something they'll have to work on and

will learn something,

>and the stuffies will probably enjoy shooting you down.

>These newsgroups aren't in any way 'owned' by the

people who like to make

>themselves out to be the most experienced posters, nor

do these people

have

>the right to moderate them, even if they do manage to

convince some people

>of such fallacy with their tone.

>

>

>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

>news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>>I'm using the code below to send newsletters via the

MAPI control (I

>>couldn't find the MAPI API). Now, it inserts plain

text fine as the

>standard

>>body, but I want to insert the text into the

actual "source" of the

>e-mail.

>>(thus allowing HTML e-mail aswell as plain text).

>>

>>Anyone have any ideas?.

>>

>>--Module code

>>Dim i As Long

>>For i = 0 To frmLeft.List1.ListCount - 1

>>MDIForm1.MS.NewSession = True

>>MDIForm1.MS.Action = 1

>>MDIForm1.MM.SessionID =

MDIForm1.MS.SessionID

>>MDIForm1.MM.Compose

>>MDIForm1.MM.MsgSubject =

frmHF.txtTitle.Text & " #" &

>>frmHF.txtNumber.Text

>>MDIForm1.MM.MsgNoteText =

frmBody.txtBody.Text

>>MDIForm1.MM.RecipAddress =

frmLeft.List1.List(i)

>>MDIForm1.MM.Send

>>MDIForm1.MS.Action = 2

>>Next

>>'End Module code

>>

>>Btw, apologies if the code above looks a tad messy

but, I want to get it

>>working before I bother tidying it up.

>>

>>--

>>Regards

>>

>>Steven Burn

>>Ur I.T. Mate Group CEO

>>www.it-mate.co.uk

>>

>>Disclaimer:

>>My advice is provided on an 'as-is' basis. Just

because I tell you

>>something, does not mean I am right.

>>

>>

>>

>

>





.



-

Re:MAPI and e-mail

Well, like you said - what if they don't have mapi

installed. They're stuffed.







Quote
-----Original Message-----

Woops, meant to put with and without Outlook, not MAPI



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I

tell you

something, does not mean I am right.





Steven Burn <ceo@PVT_it-mate.co.uk>wrote in message

news:#$SjVKhhDHA.1740@tk2msftngp13.phx.gbl...

>Not useful unless everyone that uses it, has Outlook

installed.

>

>I'd rather find a way to get it working for those with

and without MAPI

(for

>example, AOL users).

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because

I tell you

>something, does not mean I am right.

>

>

>Frampton Firesword <f_firesword@nospam_hotmail.com>

wrote in message

>news:OJoeb6ghDHA.3616@TK2MSFTNGP11.phx.gbl...

>>mapi's crap. Just automate outlook.

>>

>>

>>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

>>news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>>>I'm using the code below to send newsletters via

the MAPI control (I

>>>couldn't find the MAPI API). Now, it inserts plain

text fine as the

>>standard

>>>body, but I want to insert the text into the

actual "source" of the

>>e-mail.

>>>(thus allowing HTML e-mail aswell as plain text).

>>>

>>>Anyone have any ideas?.

>>>

>>>--Module code

>>>Dim i As Long

>>>For i = 0 To frmLeft.List1.ListCount - 1

>>>MDIForm1.MS.NewSession = True

>>>MDIForm1.MS.Action = 1

>>>MDIForm1.MM.SessionID =

MDIForm1.MS.SessionID

>>>MDIForm1.MM.Compose

>>>MDIForm1.MM.MsgSubject =

frmHF.txtTitle.Text & " #" &

>>>frmHF.txtNumber.Text

>>>MDIForm1.MM.MsgNoteText =

frmBody.txtBody.Text

>>>MDIForm1.MM.RecipAddress =

frmLeft.List1.List(i)

>>>MDIForm1.MM.Send

>>>MDIForm1.MS.Action = 2

>>>Next

>>>'End Module code

>>>

>>>Btw, apologies if the code above looks a tad messy

but, I want to get

it

>>>working before I bother tidying it up.

>>>

>>>--

>>>Regards

>>>

>>>Steven Burn

>>>Ur I.T. Mate Group CEO

>>>www.it-mate.co.uk

>>>

>>>Disclaimer:

>>>My advice is provided on an 'as-is' basis. Just

because I tell you

>>>something, does not mean I am right.

>>>

>>>

>>>

>>

>>

>

>





.



-

Re:MAPI and e-mail

"Frampton Firesword" <f_firesword@nospam_hotmail.com>'s wild

thoughts were released on Sun, 28 Sep 2003 23:22:40 +0100

bearing the following fruit:



Quote
mapi's crap. Just automate outlook.





Outlooks crap.



J



Quote
"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>I'm using the code below to send newsletters via the MAPI control (I

>couldn't find the MAPI API). Now, it inserts plain text fine as the

standard

>body, but I want to insert the text into the actual "source" of the

e-mail.

>(thus allowing HTML e-mail aswell as plain text).

>

>Anyone have any ideas?.

>

>--Module code

>Dim i As Long

>For i = 0 To frmLeft.List1.ListCount - 1

>MDIForm1.MS.NewSession = True

>MDIForm1.MS.Action = 1

>MDIForm1.MM.SessionID = MDIForm1.MS.SessionID

>MDIForm1.MM.Compose

>MDIForm1.MM.MsgSubject = frmHF.txtTitle.Text & " #" &

>frmHF.txtNumber.Text

>MDIForm1.MM.MsgNoteText = frmBody.txtBody.Text

>MDIForm1.MM.RecipAddress = frmLeft.List1.List(i)

>MDIForm1.MM.Send

>MDIForm1.MS.Action = 2

>Next

>'End Module code

>

>Btw, apologies if the code above looks a tad messy but, I want to get it

>working before I bother tidying it up.

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because I tell you

>something, does not mean I am right.

>

>

>







--

Bend the facts to fit the conclusion. It's easier that way.



[Abolish the TV Licence - www.tvlicensing.biz/]">www.tvlicensing.biz/]



-

Re:MAPI and e-mail

Problem has been solved Frampton. I'm now using a third party ocx control to

do the mailing. Much better than MAPI, and supports HTML mails :o) (see

"Mapi and e-mail issue: RESOLVED" at the bottom of this topic for details).



--

Regards



Steven Burn

Ur I.T. Mate Group CEO

www.it-mate.co.uk



Disclaimer:

My advice is provided on an 'as-is' basis. Just because I tell you

something, does not mean I am right.





Frampton Firesword <f_firesword_nosam@notmail.com>wrote in message

Quote
Well, like you said - what if they don't have mapi

installed. They're stuffed.







>-----Original Message-----

>Woops, meant to put with and without Outlook, not MAPI

>

>--

>Regards

>

>Steven Burn

>Ur I.T. Mate Group CEO

>www.it-mate.co.uk

>

>Disclaimer:

>My advice is provided on an 'as-is' basis. Just because I

tell you

>something, does not mean I am right.

>

>

>Steven Burn <ceo@PVT_it-mate.co.uk>wrote in message

>news:#$SjVKhhDHA.1740@tk2msftngp13.phx.gbl...

>>Not useful unless everyone that uses it, has Outlook

installed.

>>

>>I'd rather find a way to get it working for those with

and without MAPI

>(for

>>example, AOL users).

>>

>>--

>>Regards

>>

>>Steven Burn

>>Ur I.T. Mate Group CEO

>>www.it-mate.co.uk

>>

>>Disclaimer:

>>My advice is provided on an 'as-is' basis. Just because

I tell you

>>something, does not mean I am right.

>>

>>

>>Frampton Firesword <f_firesword@nospam_hotmail.com>

wrote in message

>>news:OJoeb6ghDHA.3616@TK2MSFTNGP11.phx.gbl...

>>>mapi's crap. Just automate outlook.

>>>

>>>

>>>"Steven Burn" <ceo@PVT_it-mate.co.uk>wrote in message

>>>news:%233euZPehDHA.1192@TK2MSFTNGP12.phx.gbl...

>>>>I'm using the code below to send newsletters via

the MAPI control (I

>>>>couldn't find the MAPI API). Now, it inserts plain

text fine as the

>>>standard

>>>>body, but I want to insert the text into the

actual "source" of the

>>>e-mail.

>>>>(thus allowing HTML e-mail aswell as plain text).

>>>>

>>>>Anyone have any ideas?.

>>>>

>>>>--Module code

>>>>Dim i As Long

>>>>For i = 0 To frmLeft.List1.ListCount - 1

>>>>MDIForm1.MS.NewSession = True

>>>>MDIForm1.MS.Action = 1

>>>>MDIForm1.MM.SessionID =

MDIForm1.MS.SessionID

>>>>MDIForm1.MM.Compose

>>>>MDIForm1.MM.MsgSubject =

frmHF.txtTitle.Text & " #" &

>>>>frmHF.txtNumber.Text

>>>>MDIForm1.MM.MsgNoteText =

frmBody.txtBody.Text

>>>>MDIForm1.MM.RecipAddress =

frmLeft.List1.List(i)

>>>>MDIForm1.MM.Send

>>>>MDIForm1.MS.Action = 2

>>>>Next

>>>>'End Module code

>>>>

>>>>Btw, apologies if the code above looks a tad messy

but, I want to get

>it

>>>>working before I bother tidying it up.

>>>>

>>>>--

>>>>Regards

>>>>

>>>>Steven Burn

>>>>Ur I.T. Mate Group CEO

>>>>www.it-mate.co.uk

>>>>

>>>>Disclaimer:

>>>>My advice is provided on an 'as-is' basis. Just

because I tell you

>>>>something, does not mean I am right.

>>>>

>>>>

>>>>

>>>

>>>

>>

>>

>

>

>.

>





-

Re:MAPI and e-mail

On Mon, 29 Sep 2003 01:26:04 -0700, "Frampton Firesword"

<f_firesword@notpam_notmail.con>wrote:



Quote
Good, that's what we need to see



>-----Original Message-----

>The disclaimer is meant as a little humerous, not

something to be taken

>seriously.



And yet you couldn't see it. Ironic, no?



Sheila

Just because I don't care doesn't mean I don't understand.

-

Re:MAPI and e-mail

It just looked a bit like he felt he had to put it in.





Quote
-----Original Message-----

On Mon, 29 Sep 2003 01:26:04 -0700, "Frampton Firesword"

<f_firesword@notpam_notmail.con>wrote:



>Good, that's what we need to see

>

>>-----Original Message-----

>>The disclaimer is meant as a little humerous, not

>something to be taken

>>seriously.



And yet you couldn't see it. Ironic, no?



Sheila

Just because I don't care doesn't mean I don't understand.

.



-