Solved

delphi 7, silent sending mail, MAPI

Posted on 2012-03-13
7
2,305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 101

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 27

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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

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.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

695 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