MAPI

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

MAPI

Post by Otto »

May I ask you for your advice.

I have a VB6 solution called AKTIVREPORT.
This software sends reports which are defined in a task planer.
I did this with smtp. But I also want to convert this software to FIVEWIN.

Now I saw a MAPI solution on the forum.
Does MAPI work in automatic mode with office 2007 without an user interaction.
I always faced problems with outlook and security.

I planned to do I this way before I saw the post:

To setup an FTP server where the reports from my clients with a header to whom an email should be send are send with FTP upload and then the server distributes the emails.


What do you think?
Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: MAPI

Post by James Bott »

Otto,

You can use MAPI. There are different ways you can do this. You can just send it directly to the outbox of Outlook. By default, Outlook will display a message to the user that another app is trying to send mail through Outlook. This can be turned off, but if you do, it does present somewhat of a security risk since other apps may then send emails without the user's knowledge. The advantage of using MAPI is that there is a copy of all outgoing emails in the users Send Mail folder in Outlook. The disadvantage is that for a multiuser app, only the user sending the mail will have access to this information.

You can also send mail directly through an SMTP server. In your case, most of your clients are probably using a SMTP server with Outlook. Sending mail directly to the SMTP server bypasses Outlook and is faster. You can also write a routine to keep a record of all mail sent and even create copies of the mail on disk. Doing this, you can provide access to the mail history to all users. The disadvantage of this is that somebody will have to configure the application to tell it where the SMTP server is and the username and password if required. Most users won't know this, but it can be found in Outlook's configuration.

I don't see the point of using FTP.

You can search the forum for more info on MAPI and SMTP.

Regards,
James
User avatar
Marco Turco
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London
Contact:

Re: MAPI

Post by Marco Turco »

You can always make this using the FWH smtp class.

You can also use MAPI or OLE (if outlook XP/2003/2007 is installed)
but note that Outlook always advice the customer that there is an app that is trying to send an email
and other mail client also make the same. This is for security reasons.

If you want to be sure to send the email without a user interaction the only way is to use the FWH smtp class.
Best Regards,

Marco Turco
SOFTWARE XP LLP
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: MAPI

Post by Davide »

Otto,

I too prefer smtp because Outlook MAPI interface is buggy in some versions (so it would be better to use it via OLE instead) and there are mail clients that are NOT MAPI compatible however.

It would be nice to find out a function to retrieve (perhaphs in the registry) which is the SMTP server/user/pass defined in other installed mailers though.

About the security warnings above, they can be disabled as follows:
Microsoft Outlook
http://www.mapilab.com/outlook/security/

Microsoft Outlook Express:
1. Go to Tools -> Options -> Security
2. Remove the checkmark near the "Warn me when other applications try to send mail as me" option

Mozilla Thunderbird:
1. Go to Tools -> Options -> Advanced -> Configuration Editor
2. Setup the "mapi.blind-send.warn" option to false (to disable the warning) or true (to enable it)

Hi,
Davide
Last edited by Davide on Sun Aug 30, 2009 3:07 pm, edited 1 time in total.
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: MAPI

Post by Otto »

Thank you all for your help.
I did some promising tests without any problem on my own PC. I will do some more on other PC.

Do you think I face a problem if I use one of our own smtp accounts.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: MAPI

Post by Davide »

Otto,
Otto wrote:Do you think I face a problem if I use one of our own smtp accounts.
if you don't want to setup an "open relay" http://en.wikipedia.org/wiki/Open_mail_relay (not recommended nowadays), you'll have to store the username/password in your own program, opening you to a security risk.

I recently made some changes to tsmtp.prg I don't know if Antonio included in the current FWH (I'm still on 9.05)
http://forums.fivetechsupport.com/viewt ... =3&t=15166

Hope this help.
Davide
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: MAPI

Post by Otto »

Thank you Davide.

Isn’t the security risk the same if someone sends with our program either he uses his own account or our account.
In practices the program sends once a day a report to maximum 5 email recipients.
You never can’t be cautious enough.
Therefore I ask again.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: MAPI

Post by Davide »

Otto,
Otto wrote:Isn’t the security risk the same if someone sends with our program either he uses his own account or our account.
not at all.
If someone will use your own SMTP server to send out spam or viruses, the server will soon be added to RBL's, causing troubles either to the other Clients of yours or to yourself.
Spammers are continuosly searching for open relais or, even better, passwords for closed servers, so that they can even forge the sender's address and send out their spam exactly as it would be you.

I would never distribute my own passwords to my customers; btw every ISP does provide access to an SMTP server.

Hi,
Davide
Post Reply