c# - Sending an anonymous email to my own address -
i want send anonymous email own gmail/hotmail/yahoo/any other mail service address (im not trying spam or that).
why? have .net application , want add "send log developer" feature (attaching log) using smtpclient. fact i've read 30+ pages, , found out, i.e. gmail's smtp client doesn't allow anonymous connections, , many other things.
the idea receive mail message this:
from: logs@myapp.com (non-existent email really) to: myrealaddress@somedomain.com (this real address recieve logs attachments) subject: issue report nºx (auto-generated) body: textbox attachments: logs attached
is possible? if so, how achieve it?
the short answer can't reliably achieve this. can work in cases, not all.
most email servers these days have spam filters , rules checking on emails, , in cases empty 'from' address result in special treatment. means higher spam score receiving mail server, in cases empty 'from' address result in email being silently dropped in bit bucket. have no control on this, , neither users. it's down how receiving mail server configured.
the simplest option allow user configure address , smtp server. servers require login send messages, have consider that. many isp mail servers (and internal workplace mail servers) don't require login if connection coming address owned isp (or workplace) , email address 1 registered belonging there. isps - , number apparently growing - require smtp login send mail regardless.
another option set source domain, configure spf record domain allow email ip address, , use standard 'from' address in domain. downside once discovers you've opened domain way they'll start using send spam , you'll shut down.
there many other options have own problems. 1 of problems cost money - setup costs, options ongoing costs - or open liabilities of sort.
give users choice. let them try various options , see works them: no 'from' address, user-defined 'from' address (same 'to' address first try), partial smtp login, full smtp login, etc. if don't trust code enough put passwords in, let them create throw-away account on gmail or run messages through.
Comments
Post a Comment