I was trying to use MAPI control with VB6 but when i save it gives
"Unspecified Failure has occured"
The case is same with COM MAPI objects
(CreateObject("MSMAPI.MAPIMessages"))
And one more thing is Send method works fine on my PC but it gives
"ActiveX Component can't create object"
on client machine, i have verified required files with Dependency
Walker, both machines are showing same result. The Client has
Microsoft Outlook as a default and i have Outlook Express as default.
However, my intention is
1- Automate any email client (without any dependency on email Server)
2- Save the message as Draft
Kindly suggest a solution to achieve this
www.jsware.net/jsware/vbcode.php5#mail
> 1- Automate any email client (without any dependency on email Server)
The links above provide alternatives to
email software. That's not the same as an
email server. If you mean that you don't want be
required to contact an SMTP server (the outgoing
mail server, such as smtp.someisp.com) then you
have to also somehow provide/write your own SMTP
server.
Thanks for your reply
I don't mean writing my own SMTP server, i mean whatever the server is
i don't need to change my code/whatever to support a specific server..
And by the way, I don't want to send email via SMTP because as per my
knowledge, the email sent will not be seen by the email client of end
user. And most importantly, i don't want to send the email i just want
to Save it as Draft which means automate client's default email
software (Outlook Express, Microsoft Outlook, Thunderbird, etc).
You will have to find a way of automating each one individually.
There is no standard method of access the folder structure (and may not
even exist in some cases)
--
Dean Earley (dean....@icode.co.uk)
i-Catcher Development Team
iCode Systems
Another option for OE, is to write an EML file, then open it with
ShellExecute. This opens a window with the email text, but does not send it,
unless you send keystrokes(Alt+s) using PostMessage or Sendkeys. See this
VB6 sample and related samples:
http://vbnet.mvps.org/index.html?code/internet/shellexecutelargeemail.htm
There are some APIs like MAPILogon, MAPISaveMail, MAPISendMail but i
couldn't found a working example for MAPISaveMail. if MAPISaveMail
saves messages in specified folder then it might be used to support
above clients for my specific needs.
>> As others suggested, there is no standard way of automating all email
>> clients.
> I used COM MAPI to send emails and the email i sent was there in my
> Sent folder, i tested this method for Outlook Express, MS Outlook and
> Thunderbird and it worked well. But the problem is email was sent not
> saved as Draft, and to save it as Draft i think some automation
> support will be required.
Look, it doesn't matter how badly you want to do this, it simply CAN'T BE
DONE with "any email client" as your subject indicates. Not every client
supports MAPI, and not every client supports Automation, and some don't
support either. You're banging your head against a wall here.
>it simply CAN'T BE DONE with "any email client"
:(, i wish they come up with some standard interface for automation
while doing/providing optimization/features
> You're banging your head against a wall here
Thanks for stopping me banging my head anymore BUT
Can you provide (link of) a working sample of MAPI via APIs, not
controls
Thank you all guys for this support
(i have stopped looking for automating any client :) )
did you check
http://www.planet-source-code.com/vb/default.asp?lngWId=1#categories ?