Solved

delphi 7, silent sending mail, MAPI

Posted on 2012-03-13
7
2,216 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 30

Expert Comment

by:Marco Gasi
Comment Utility
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
Comment Utility
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 25

Accepted Solution

by:
Sinisa Vuk earned 200 total points
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 30

Expert Comment

by:Marco Gasi
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Set OWA language and time zone in Exchange for individuals, all users or per database.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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: …

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now