User's Mail Editor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following code that I got from this newsgroup to start a
user's default e-mail editor and it works ok. However, I would like to
attach a file to the editor (like using word as editor)

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "mailto:" & HttpUtility.UrlEncode([To]) &
"?subject=" & Subject & "&body=" & Message
Process.Start(psi)

What do I use for the variable (like &body is used for the text body)?
 
Dennis,

You cannot using this method.

You are absolute not the first one who ask this.

This is code to call the default mail client, whatever this is even if it
has no mailattachment as Outlook Express and Office Outlook have.

Your solution for this is using the webmail, however than your user does not
see the mail. Or Office Outlook interop. And than only users who have Office
Outlook can use that

I know it helps nothing however,

Cor
 
Thanks Cor for you answer. I've been searching Google and did find out
where this is not possible. Just one more question, If I read Google right,
I have to have IIs installed on my computer to use the System.web.mail class
for sending e-mail...is this correct?
--
Dennis in Houston


Cor Ligthert said:
Dennis,

You cannot using this method.

You are absolute not the first one who ask this.

This is code to call the default mail client, whatever this is even if it
has no mailattachment as Outlook Express and Office Outlook have.

Your solution for this is using the webmail, however than your user does not
see the mail. Or Office Outlook interop. And than only users who have Office
Outlook can use that

I know it helps nothing however,

Cor


Dennis said:
I am using the following code that I got from this newsgroup to start a
user's default e-mail editor and it works ok. However, I would like to
attach a file to the editor (like using word as editor)

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "mailto:" & HttpUtility.UrlEncode([To]) &
"?subject=" & Subject & "&body=" & Message
Process.Start(psi)

What do I use for the variable (like &body is used for the text body)?
 
I think you can accomplish this via MAPI (MSMAPI32 ActiveX controls). MAPI
will use your default e-mail editor (Outlook, Outlook Express.... even Yahoo
web mail if you install the Yahoo experience tools).

Cor Ligthert said:
Dennis,

You cannot using this method.

You are absolute not the first one who ask this.

This is code to call the default mail client, whatever this is even if it
has no mailattachment as Outlook Express and Office Outlook have.

Your solution for this is using the webmail, however than your user does
not see the mail. Or Office Outlook interop. And than only users who have
Office Outlook can use that

I know it helps nothing however,

Cor


Dennis said:
I am using the following code that I got from this newsgroup to start a
user's default e-mail editor and it works ok. However, I would like to
attach a file to the editor (like using word as editor)

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "mailto:" & HttpUtility.UrlEncode([To]) &
"?subject=" & Subject & "&body=" & Message
Process.Start(psi)

What do I use for the variable (like &body is used for the text body)?
 
Cor, I had read that link and from the following extract, I concluded that I
needed IIs. I currently have e-mail thru my service provider (roadrunner)..
Apparently, I need also either IIs or Microsoft Exchange, IMail or someother
relay in beween the roadrunner service and my vb.net application...Am I
reading this correctly?

"A relay is a service that allows you to send email. It is usually a full
fledged mail server, or can be a specialized SMTP Service. Some examples of a
mail server include Microsoft Exchange, IMail by IPSwitch, or Mail Enable by
Mail Enable. An example of a SMTP service is the SMTP Service installed that
can be installed with IIS. SWM sends email to a relay server, and the relay
server is responsible for delivering the email to the final destination"
 
I looked up MAPI and it infers that I have to have an exchange server...I'm
not sure what this is. I use Outlook to send e-mail thru my internet
provider "Time Warner RoadRunner" and Word as my default e-mail editor.
What else do I need to use MAPI?
--
Dennis in Houston


CMM said:
I think you can accomplish this via MAPI (MSMAPI32 ActiveX controls). MAPI
will use your default e-mail editor (Outlook, Outlook Express.... even Yahoo
web mail if you install the Yahoo experience tools).

Cor Ligthert said:
Dennis,

You cannot using this method.

You are absolute not the first one who ask this.

This is code to call the default mail client, whatever this is even if it
has no mailattachment as Outlook Express and Office Outlook have.

Your solution for this is using the webmail, however than your user does
not see the mail. Or Office Outlook interop. And than only users who have
Office Outlook can use that

I know it helps nothing however,

Cor


Dennis said:
I am using the following code that I got from this newsgroup to start a
user's default e-mail editor and it works ok. However, I would like to
attach a file to the editor (like using word as editor)

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = "mailto:" & HttpUtility.UrlEncode([To]) &
"?subject=" & Subject & "&body=" & Message
Process.Start(psi)

What do I use for the variable (like &body is used for the text body)?
 
Dennis,

You need one of those providers as you mention not all. I name it forever
the ultimate spam engine.

You can use one IIS SMTP Mail servers which you can create on one of your
servers (or desktop that functions as this) and take its IP addres. You
create it using in the configuration at that special Microsoft Windows tab
at installed software and in that the IIS part. (very simple to do just
checking the checkbox for that).

Most IP providers don't like it if you take their SMTP server. You don't
need Exchange for this. Morevover if you have Exchange it is more work to
use.

You should create your own loging because without Exchange there is nothing
logged to who you have sent a mail.

I hope this helps,

Cor
 
Dennis,
I looked up MAPI and it infers that I have to have an exchange server...I'm
not sure what this is. I use Outlook to send e-mail thru my internet
provider "Time Warner RoadRunner" and Word as my default e-mail editor.
What else do I need to use MAPI?
I thought that as well that the MAPI was used in combination with Exchange
server. So I have checked this at Internet. I saw some things about Outlook
Express, however I doubt it of the writters of that are not confused with
Office Outlook, what started with that name from MS Mail 4.0 what had got
than got the name MS Exchange and than the client who had forever had in all
versions until 3.5 had the name Exchange became Outlook. It was a while very
confusing to explain that.

However as CMM has a good solutiong that real works on Outlook Express and
by instance all Apple email clients, than we are probably all very
interested.

Cor
 
I have confirmed personally that the mapi activex controls (msmapi32.ocx) do
indeed work with OE... in fact they work better with OE than with Outlook
because of Outlook's Object Model Guard.

MAPI (Mail API) was intended to be a "generic" interface into any "default"
e-mail program on the computer... not just MSMail or Exchange based ones.

(VB6 code using the two controls necessary)

MAPISession1.DownLoadMail = False
MAPISession1.SignOn
MAPISession1.NewSession = True

MAPIMessages1.SessionID = MAPISession1.SessionID

MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "(e-mail address removed)"
MAPIMessages1.msgSubject = "My subject"
MAPIMessages1.msgNoteText = "bla bla bla"

MAPIMessages1.Send

MAPISession1.SignOff
MAPISession1.NewSession = False
 
CMM,

Thanks, I will try it soon,

Cor

CMM said:
I have confirmed personally that the mapi activex controls (msmapi32.ocx)
do indeed work with OE... in fact they work better with OE than with
Outlook because of Outlook's Object Model Guard.

MAPI (Mail API) was intended to be a "generic" interface into any
"default" e-mail program on the computer... not just MSMail or Exchange
based ones.

(VB6 code using the two controls necessary)

MAPISession1.DownLoadMail = False
MAPISession1.SignOn
MAPISession1.NewSession = True

MAPIMessages1.SessionID = MAPISession1.SessionID

MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "(e-mail address removed)"
MAPIMessages1.msgSubject = "My subject"
MAPIMessages1.msgNoteText = "bla bla bla"

MAPIMessages1.Send

MAPISession1.SignOff
MAPISession1.NewSession = False
 
Just to point it (what might be obvious...) you need to have an e-mail
account set up in OE and it needs to be your "default" e-mail program as per
Internet Explorer's -> Properties (Options) -> Programs.

If instead Outlook 2003 is the default, it triggers the Outlook Guard (not
sure about Outlook 2000 or 2002). I dunno off the top of my head how to get
around that... something having to do with adding a certificate or
whatever.... I'm sure there's info on how to do it on the web.

But it works for OE splendidly (WinXP SP2)
 
Back
Top