Solved

how to send E-MAIL with delphi, automatically?

Posted on 2003-11-03
21
358 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
  • 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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 500 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 267
Delphi cmd execution 6 60
find a node in VST 2 68
can't find the executable in Simulator 1 90
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 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