I installed PHP in windows server 2003. All the files are working fine except the mail issue. There is no problem in SMTP. Because I run the JSP project in the same server.In that mail function working fine. So where is the problem? And how can i manage? I set the SMTP server in PHP as
; For Win32 only.
SMTP = localhost
smtp_port = 25
Does the SMTP service need authentication? Maybe there is a setting in the JSP code which authenticates against the SMTP server? You could look at the JSP code to see if there is a different SMTP configuration.
Another reason could be that the SMTP allows only specific sender addresses/domains. Are the sender addresses of the PHP and JSP applications different?
If your smtp server is not exposed and protected behind a firewall you can allow relay and that should take care of it.
If not then verify you can send the email you want using telnet
Related
I have a website on Azure Web Apps and want to enable SMTP settings to be able to receive emails through my websites contact form. One of the solutions that I found on this forum were to use an external SMTP. I went over to my web root and modified the php.ini file, changing the default SMTP settings to the external SMTP I want to use. I changed the SMTP server name and the port number.
However, that does not suffice. I need to provide credentials for SMTP relay, and I don't understand how SMTP authentication comes into play here. I am currently using the mail function in my HTML form with PHP handling.
If someone could please guide me on the process, I'd be highly grateful.
Actually, on Azure, you don't need to use External SMTP server to send emails in your app. You can easily use SendGrid to satisfy this.
Here is a detailed guide on how to use the SendGrid email service from PHP: https://azure.microsoft.com/en-us/documentation/articles/store-sendgrid-php-how-to-send-email/.
I am working on an email functionality in PHP, SMTP with PHPMailer. In my office we have different servers. Here, it's working fine. But, when I am trying to send mails from outside the office, it doesn't work. I am using SMTP Auth False. I'm providing Hostname and Port number only.
Why isn't it working?
If you are not authenticating against the SMTP server probably is because your SMTP works only for your local office network.
For security reasons, your SMTP server may be requesting authentication or just not responding to connections outside your local network.
You need to ask IT guys on your office so they provide you some SMTP credentials to use outside the office.
I have an Apache, PHP, MySQL combo running on my Windows 8 machine. I want to send mails using the PHP mail function but then learnt that I need an SMTP server configured. How to do this? I have Outlook installed if that info is of any use.
I used a library called "swiftmail" which can contact an external SMTP server (like gmail) and do the job. Turns out having a local SMTP server wasn't required after all.
Here is the link: http://swiftmailer.org/
I am working for a client who bought a server (V-Server from Strato) with IIS. I've set up a SMTP Server so I can use "mail()" from php to send mails. But everytime I am trying to send a mail, it tells me to configure my SMTP server.
I already added realys, new domains and restarted the whole thing. What can I do? I want to send them from the localhost because the server is running on the machine itself.
First of all, you need to check your mail server (SMTP Server) to confirm it is working properly. To check it manually try telnet 25 port of localhost and execute basic SMTP command to see if it accept mail relaying from your localhost. Microsoft has an article on SMTP check with telnet client, have a look if needed.
If your SMTP server is working as expected, then try debugging your php coding.
FYI: No comments privilege, had to write this as answer...
I am using XAMPP for localdevelopment.And I am using the mail() function for sending the mail.
But unfortunately it wont sent the mail.I am not using any SMTP server in local host.If I need to sent mail what can I do?Thanks in advance.
You need to configure your SMTP server details in your php.ini. Alternatively, you may use a mailer library like the Swift Mailer.
As Maerlyn suggests, you can add the SMTP to your php.ini file. However thing to keep in mind is that if your SMTP server requires authentication or it requires POP before SMTP, php.ini cant help you with that. If your ISP has an SMTP server and you have configured your Outlook to use your ISP email account, it will authorize your IP (for some time) to send out emails through that SMTP server so the mail() function will work.