Sending e-mail via CDOSYSMail

0

I have a email sending code, which I get the sender via request.form and put it inside a variable like this:

Dim nome, emailremetente
nome = trim(request.form("name"))
emailremetente = trim(request.form("email")) 

And in this line I enter the variables:

'NOME E E-MAIL DO REMETENTE
objCDOSYSMail.From = nome & "<" & emailremetente & ">" 

So far so good, however if on the form I enter my private email ([email protected]) it does not send, but if I enter meuemail @ same-domain-of-site -what- I'm sending-mail-mail- it sends.

That is, if the email of the sender is from the same domain that is sending, it sends, but if it is from another domain it does not send, why and how to solve it? >     

asked by anonymous 03.05.2017 / 15:35

2 answers

0

For SPAM and other security-related reasons, most hosting providers (maybe ALL) do not send email via script when the sender domain differs from the site domain.

If your site's domain is myite.com , the sender must be @myite.com .

    
20.08.2017 / 02:34
0

We do not really recommend putting from like any email, and servers usually only allow email from the domain itself because of SPAM. But an alternative to this is the use of Reply-To .

With this technique, you maintain the sender as an e-mail from your domain, and add the header reply-to , which causes the recipient of the e-mail to try to reply, the e-mail that will be used for the response will be as indicated by reply-to .

The usage would be this:

objCDOSYSMail.ReplyTo = "[email protected]"
    
20.08.2017 / 02:50