From: atif on
Hi,
I want to automate any email client running on Windows and save the
generated email in as Draft.

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
From: mayayana on
You can't automate "any" email program.
If you want to send email without needing an
email program you can do it directly. Search
for vbSendMail for a DLL, or see here for
dependency-free, all-VB code:

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.


From: atif on
On Jul 28, 6:51 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
> 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).
From: Dean Earley on
atif wrote:
> On Jul 28, 6:51 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
>> 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.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: expvb on
As others suggested, there is no standard way of automating all email
clients. Outlook is the easiest because it has an automation model. MAPI can
be used with Outlook and Outlook Express, it will get the messages from the
one that you made the default email program. If you have thousands of
messages in your Inbox, when you use Fetch method; it could take few minutes
and CPU usage spikes to 100%. To avoid this, move most of the messages to a
custom folder, or use FetchUnreadOnly property to reduce the number of
messages. I am not sure if this can be sped up using the API. This also
depends on the intended usage.

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




 |  Next  |  Last
Pages: 1 2
Prev: VB 5 Reinstall Problem
Next: VB6 and Zlib1