Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send email from a program _without_ using a preexisting account?

Tags:

.net

email

smtp

I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.)

I've been told you could do some stuff with telneting to port 25, but I'm very fuzzy on the details. Most of the code snippets on Google assume you have a preexisting account, which doesn't work in this situation.

I am using .NET v3.5 (C# in particular), but I would imagine the ideas are similar enough in most languages. As long as you realize I'm doing this for an offline app, and don't supply me with PHP code or something, we should be fine.

like image 947
Domenic Avatar asked Aug 27 '08 12:08

Domenic


3 Answers

As long as your account is on gmail.com, set up gmail-smtp-in.l.google.com as the outgoing SMTP-server in your program. You do not need to provide a password to send email to gmail-accounts when using that server.

like image 125
Espo Avatar answered Oct 10 '22 05:10

Espo


I would create a webservice to connect to. This webservice should send the email based on the data your program provide. All sensitive access-data is kept on the webservice side, so it's safer.

like image 26
Biri Avatar answered Oct 10 '22 05:10

Biri


If the program has to email you directly, it has to get that information somehow, so a determined attacker could gain that information as well.

Have you considered hosting a simple http form or web service somewhere, so that you could post the information you need there from the application (no authentication required), and either save it to manually look at later, or send the email from that server?

like image 32
Chris Marasti-Georg Avatar answered Oct 10 '22 06:10

Chris Marasti-Georg