• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

How to launch default email client?

I am writing a program, it generate
a report at c:\temp\myreport.htm,
how to launch user's default email
client and automatically attach it when
user press a button?

Thanks

Shekou
0
shekou
Asked:
shekou
  • 4
  • 3
  • 2
1 Solution
 
EpsylonCommented:
Try this app from Simonet AKA Alex (source included):

http://www.bhnet.com.br/~simonet/archive/mapimail.zip
0
 
simonetCommented:
>Simonet AKA Alex

I guess it's the other way around, Epsylon!
0
 
EpsylonCommented:
I think both ways are right...
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
shekouAuthor Commented:
Is there any simple way use shellexecute
to implement that?

Rgds

Shekou
0
 
EpsylonCommented:
Not when you want to attach files.
0
 
shekouAuthor Commented:
Find  a command like this:
ShellExecute( 0, 'Open', PChar('mailto:somebody@somewhere.com?Subject=Hey!&body=Test ), nil, nil, SW_SHOWNORMAL )
It seems could use ?Subject and &body automatically fill Subject and body field, which parameter used for attachement?

Rgds

Shekou
0
 
EpsylonCommented:
Like I said, you can't use attachments this way...
0
 
simonetCommented:
Epsylon is right.

By using ShellExecute you cannot attach files to the e-mail.  Only by handling MapiSendMail directly you can attach files.

shekou, please read the question again.

Alex
0
 
shekouAuthor Commented:
OK, thanks, I tried MAPISendmail, it
works.

Rgds

Shekou
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now