tags:

views:

16

answers:

2

Hi, I am using code to send email through SMTP that is given manually. I wish that user does not have to give the SMTP. My application should get SMTP automatically and use that. Can I know what is the SMTP of the current ISP, with which my client is connected?

Thanks Furqan

A: 

You could try to read that from the user's e-mail clients; AFAIK each e-mail client (e.g. Outlook, Thunderbird, Opera, Eudora) stores the SMTP server settings differently; so probably look for the most common ones (Thunderbird, Outlook, ?). Also, some people only use web-based e-mail (esp. gMail users), so they may not even have a SMTP setting stored anywhere.

Note: nosing around in other apps' settings can be seen as borderline spyware, so I suggest to get permission from the user before you start digging in their app settings.

Piskvor
A: 

No, I don't think this is possible. What you could try is to look if the SMTP server is configured in an other program. E.g. under Windows in Windows Mail. However, I don't know if it's worth the trouble. Today SMTP auth is common and probably no other program gives you access to the users credentials so you have to ask the user in all cases.

fschmitt