Solved

delphi 7, silent sending mail, MAPI

Posted on 2012-03-13
7
2,254 Views
Last Modified: 2012-03-14
I'd like to send "silent" email in delphi 7 using MAPI, just without Outlook dialogs displaying every time i send an email.
I have working code just can't figure out how to disable dialogs, wandering if changing this line could help:
Result := SM(0, Application.Handle, msg, MAPI_DIALOG or MAPI_LOGON_UI, 0);
0
Comment
Question by:spuppis
7 Comments
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37715573
I don't think it is possible, and however I'm sure it would not be politically correct nor legal send email without inform your user about. Are you sure to want to do it?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37715611
I know we were able to do it several years ago but it did require a mod to the MS Exchange server.  

MS in an attempt to help prevent malware from spamming people added a flag in Exchange that when set requires the prompt to the user before an EMail goes out.

If you can be certain that malicious code can't get onto your system or that you would detect it quickly than you might be able to reset the FLAG to 0

mlmcc
0
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 200 total points
ID: 37718669
If you want to send mails I recommend to use great ICS (internet component suite). There is example/demo how to do this.
Agree that spamming is very bad, but I have some app registration project where ics help me out.

note: your exchange can be read for addresses but mails can be send wia ics.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 31

Expert Comment

by:Marco Gasi
ID: 37718707
I developed a small component to implement log files sending in my applications: this component post log files to my web server where a php script sends files as email attachments to my mail box. The component is free with source: maybe you can find it interesting, depending on what is your goal here. http://www.delphicoding.com/mgeasylog.php

Cheers
0
 
LVL 19

Expert Comment

by:Thommy
ID: 37718774
Try it as follows...
Result := SM(0, Application.Handle, msg, 0, 0);

Open in new window


Some helpful links:
Sending an email from Delphi using MAPI
How to send email using the MAPI
0
 
LVL 19

Expert Comment

by:Thommy
ID: 37719204
If you now get a security warning from Outlook, you have 2 options to prevent this warning:

1.)
Disable warning in Outlook security center (line of action depends on your Outlook version)

2.)
If you are in a network and a network administrator controls the group policies, then you should ask your network administrator to add your program to the list of trusted programs, for which warning is not displayed...
0
 

Author Comment

by:spuppis
ID: 37719689
ICS works perfectly, it helped me find also the correct version of dlls which is 0.9.8h - Indy found at: http://indy.fulgan.com/SSL/Archive/
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question