?
Solved

how to send E-MAIL with delphi, automatically?

Posted on 2003-11-03
21
Medium Priority
?
368 Views
Last Modified: 2010-04-05
HI, and thanks to pay attention to me.

I want to know that, how can I send my an email from my computer without automatically? means that I don't want to go to server site for example "yahoo" or "hotmail" or ... , and send it just for running my own program. and ALSO no other programs, like "outlook" or ... , interupts me.

hope you to understand the meaning of "automatic".

Thank you again for your attention.
0
Comment
Question by:mehdi_m
[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
  • 8
  • 7
  • 3
  • +2
21 Comments
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9674495
Use the TidSMTP component from Indy. It is included with Delphi versions 6 and 7
and can be downloaded for other versions from:
http://www.nevrona.com/indy

0
 
LVL 1

Expert Comment

by:JackNaif
ID: 9675929
Or if you're using Delphi 5 you can check the TNMSMTP.
0
 
LVL 5

Expert Comment

by:DeerBear
ID: 9677453
Hi,

To get you started with Indy, you have to:

1) Add a TIdMessage component
2) Add a TIdSMTP component

then write the following

SMTP1.Connect;
SMTP1.Send( Message );
SMTP1.Disconnect;

HTH,

Andrew
0
Industry Leaders: 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!

 
LVL 26

Expert Comment

by:EddieShipman
ID: 9678014
JackNaif, please do not recommend NM components to anyone, they are buggy and haven't been
updated since 1998. I don't care if they are installed with D4 and D5, You can get Indy for free and
then even include source code, unlike the NM componnets.

It is my mission to get those components wiped from the face of the earth. One of the worst
business descisions ever by Borland. Glad they are gone from the install...
0
 
LVL 1

Expert Comment

by:JackNaif
ID: 9679188
All right, all right! =)

I'll try the Indy components and let you know if I liked them better or not...
0
 

Author Comment

by:mehdi_m
ID: 9690903
ok.

but I cannot find the target email address field ?
can you make a better example 4 me?

thank you.

mehdi
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9691811
you have a Recipients property that is a stringlist. Add your recipients to the stringlist.
0
 
LVL 6

Expert Comment

by:swift99
ID: 9691848
0
 

Author Comment

by:mehdi_m
ID: 9704554
I fill all properties with a target email
 
  IdMessage1.BccList[0]
  IdMessage1.CCList[0]
  IdMessage1.From.Address
  IdMessage1.ReceiptRecipient.Address
  IdMessage1.Recipients[0]
  IdMessage1.ReplyTo[0]
  IdMessage1.Sender.Address

like "name@yahoo.com". and it closes gracefully. but no email will be sent to target email.

should I use username, password properties.
can you explain about host property?

thank you.

mehdi


0
 

Author Comment

by:mehdi_m
ID: 9704577
and I forgot,

what mail (SMTP) server can I use in internet, that is FREE?
of course IF I must use one!???
0
 
LVL 6

Expert Comment

by:swift99
ID: 9704629
ICS POP3 server (http:overbyte.delphicenter.com).
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9705298
Free SMTP services are very difficult to come by, otherwise, spammers would use them
greatly.

You have an ISP, correct? Why don't you use your own for testing and have your users
configure theirs for use with your software?

Host is the SMTP server, username and password are your account info.
0
 

Author Comment

by:mehdi_m
ID: 9708395
EddieShipman.
can you explain more.

I have yahoo and hotmail mail account.
can I use them? if yes what is the server name for them?

and can you please tell MORE EXACTLY about filling properties of IdSMTP component! because I'm not expert as you :(   ;)

thank you.

mehdi
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9716260
No, Yahoo and Hotmail have both discntinued their smtp
services.

What program do you ue to send and receive email?
0
 

Author Comment

by:mehdi_m
ID: 9718695
I'm wanna write a program! don own anything!

I want to send e-mail without notifying me! send by a click when online.
what can I do with components said as above.
it's so much better that you give me a sample. (if you can!)

mehdi
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9718929
I NEED MORE INFORMATION if I am going to give you an example.
I can not set the correct properties for idSMTP without knowing the
properties of your ISP.

I just guess I don't understand what you are trying to do.
0
 
LVL 6

Expert Comment

by:swift99
ID: 9722318
The Indy examples should have what you need.  Have you checked out the project Jedi web site?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9722936
Actually, the Indy samples are located here:
http://www.indyproject.org/indy/demodownloads/I9D6_Demos_24Nov02.zip
0
 

Author Comment

by:mehdi_m
ID: 9852865
Dear EddieShipman.

what kind of properties should you know from my ISP. can you explain more about it. I think it is not important to know the exact values, that will work. just make an example for me which sends message into a target e-mail (without intrupting sender-user if possible). and you can explain about those properties which you don know instead of filling them. please.

Thank you.

mehdi
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 1500 total points
ID: 9852973
Host is the SMTP server, Username and Password are your account info.
Get this from your account settings in your regular email client, what is your
regular email client, anyway?

Please do not post your info on this forum.

The idSMTP properties above relate to the same info for your ISP. i.e.


  idSMTP1.Host := 'smtp.server.myisp.com';
  idSMTP1.UserName := 'MyUserAccountName';
  idSMTP1.Password := 'myaccountpassword';
0
 

Author Comment

by:mehdi_m
ID: 10535937
Thank you  Eddie and sorry about a long delay of answering.
Pings are your right.
:)
mehdi
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

764 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