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

Asked

Viewed 198 times

2

I am using wampserver 2.0 in windows server 2008 R2 Standard.
On the server is installed the SMTP Virtual 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 e-mail you two ways:

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

SMTP server Response: 550 5.7.1 Unable to Relay [email protected]

  1. Using the Swiftmailer class and authenticating the submission, however the class returns true stating that the email was sent but in the mailbox there is nothing, already tried with the Hotmail, gmail, and others.

Does anyone have any idea how to solve the problem?

  • Already tried to change the SMTP port from 25 to 587?

  • the server port is 25 according to the system administrator’s information. But is there a problem using port 25? Isn’t that the default? The server responds at port 25, the problem is that nothing arrives at the mailbox.

1 answer

1

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

You can read the article: http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol for some more information.

I hope I’ve helped.

  • But the submission is authenticated, despite using port 25 and still can be considered spam?

  • Look, as I told you, some servers are characterizing it this way now, in the email header usually gets the connection data and if I’m not mistaken there is also the port used, if it is the rule of the server that will receive the e-mail sent by port 25 should be considered SPAM, yes it will be characterized as SPAM.

  • Take a look at this text here: http://www.evernote.com/shard/s451/sh/23fc6f4e-e8a6-4296-bab5-c0f19f5d2260/515664389536544a0675d6d81d1a07b5 I hope your doubts have now been clarified after reading this text.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.