Send email via PHP on windows server 2008 R Standard with wampserver 2.0

2

I'm using wampserver 2.0 on windows server 2008 R2 Standard. SMTP Virtual Server is installed on the server. In php.ini I have the following configuration:

[mail function]
SMTP = 000.00.000.000 //IP do servidor SMTP, substituí o IP original só para exemplo
smtp_port = 25
sendmail_from = [email protected] //coloquei meu-dominio só para o exemplo
;sendmail_path =
;mail.force_extra_parameters =
mail.add_x_header = On
;mail.log =

I'm trying to send email in two ways:

  • Using the PHP "mail ()" function, however, the following message is returned:
  •   

    SMTP server response: 550 5.7.1 Unable to relay [email protected]

  • Using the Swiftmailer class and authenticating the send, however, the class returns true stating that the email was sent but in the mailbox there is nothing, I already tried it with hotmail, gmail, and others.
  • Does anyone have any ideas how to solve the problem?

        
    asked by anonymous 21.08.2014 / 13:55

    1 answer

    1

    I believe that for some time it was determined by the internet CG in Brazil that port 25 would be retired, and that it would now be necessary to use a secure port (SSL or TLS), with user authentication, to reduce SPAM , so emails sent over port 25 are usually blocked immediately on many servers, the MTA itself must have the authentication feature, you just have to take a look at its documentation.

    You can read the article link for some more information.

    I hope I have helped.

        
    21.08.2014 / 16:22