[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Send Mail using OutlookExpress

Posted on 2000-03-22
5
Medium Priority
?
165 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
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Integration Management Part 2
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

834 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