Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • Last Modified:

how to send E-MAIL with delphi, automatically?

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
mehdi_m
Asked:
mehdi_m
  • 8
  • 7
  • 3
  • +2
1 Solution
 
Eddie ShipmanAll-around developerCommented:
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
 
JackNaifCommented:
Or if you're using Delphi 5 you can check the TNMSMTP.
0
 
DeerBearCommented:
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
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!

 
Eddie ShipmanAll-around developerCommented:
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
 
JackNaifCommented:
All right, all right! =)

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

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

thank you.

mehdi
0
 
Eddie ShipmanAll-around developerCommented:
you have a Recipients property that is a stringlist. Add your recipients to the stringlist.
0
 
swift99Commented:
0
 
mehdi_mAuthor Commented:
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
 
mehdi_mAuthor Commented:
and I forgot,

what mail (SMTP) server can I use in internet, that is FREE?
of course IF I must use one!???
0
 
swift99Commented:
ICS POP3 server (http:overbyte.delphicenter.com).
0
 
Eddie ShipmanAll-around developerCommented:
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
 
mehdi_mAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
No, Yahoo and Hotmail have both discntinued their smtp
services.

What program do you ue to send and receive email?
0
 
mehdi_mAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
swift99Commented:
The Indy examples should have what you need.  Have you checked out the project Jedi web site?
0
 
Eddie ShipmanAll-around developerCommented:
Actually, the Indy samples are located here:
http://www.indyproject.org/indy/demodownloads/I9D6_Demos_24Nov02.zip
0
 
mehdi_mAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
mehdi_mAuthor Commented:
Thank you  Eddie and sorry about a long delay of answering.
Pings are your right.
:)
mehdi
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 8
  • 7
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now