?
Solved

Send Mail using OutlookExpress

Posted on 2000-03-22
5
Medium Priority
?
162 Views
Last Modified: 2010-05-18
I want to send e-mail to a given recipient. The problem is that there should be a file attached. I made it using Outlook, but it doesn't work with OutlookExpress. Here is the code. Any idea ???


    OutlookApplication.Connect;
    NmSpace := OutlookApplication.GetNamespace('MAPI');
    NmSpace.Logon('', '', False, False);
    MailItem1.ConnectTo(OutlookApplication.CreateItem(olMailItem) as MailItem);
    MailItem1.Recipients.Add(ebMail.Text);
    MailItem1.Subject := 'sample';
    MailItem1.Attachments.Add('C:\abc.xls', EmptyParam, EmptyParam, EmptyParam);
    MailItem1.Send;
    Close;
0
Comment
Question by:simoraikov
[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
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 2644548
It's not possible to use this code to control OutlookExpress, only Outlook. I think the only way to send attachments is using MAPImail from Simonet (Alex). You have seen that demo already I believe.
0
 
LVL 2

Expert Comment

by:florisb
ID: 2644566
Does outlook-express provide a library to import? Check it; as said; code above is Outlook.
0
 
LVL 2

Expert Comment

by:Serega
ID: 2645105
If OutlookExpress is default mailer in your system, you can do it simply by ShellExecute.
0
 
LVL 1

Author Comment

by:simoraikov
ID: 2648173
The problem is that I need to send attachment.
0
 

Accepted Solution

by:
Bmacri earned 200 total points
ID: 2836382
Try using SMTP delphi comes with an example  \Demos\SMTP

Try that
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

765 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