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.
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/.
Reading up on GAE as a possible alternative to dedicated hosting (or VPS)...
Seems I would need to re-write a bit of code, if I had modules which relied on SMTP. Does this mean that even if I connected to a remote SMTP server that code would need to change to an HTTP API (assuming one is even provided by an third party SMTP provider such as smtp.com).
Yes - AppEngine/PHP does not yet support sockets and thus you can not connect to external SMTP servers. Also, even with sockets you would not be able to use SMPT on port 25, but authenticated SMTP on port 587 - see socket limitations.
OTOH, you can send email from AppEngine via the Mail API.
If you still want to send email via an external mail provider, you need to choose one that supports HTTP API, for example Amazon SES.
So, I developed this web application which needs me to send emails to everyone (details in a mysql database), providing a unique set of user credentials. I have a virtual server on the University network where I am hosting my PHP based application, so it obviously doesn't have its own mail server/SMTP settings.
So, if I were to send out mails from a university network, I guess I should request the network admin for the SMTP settings for the university mail network and then use PEAR for it right?
I need to confirm this because it's kind of a big deal to make a request like that, and I myself have never used PHP to send mails 'from' an external email id not linked to the server.
Are there any alternatives to this?
Yes you can use PEAR::mail to send mails via SMTP server. However, if SMTP is configured on localhost you can simply use mail() function to send mail. You can also connect to SMTP server via socket but then you need to handle whole protocol communication.
Hi I am configuring a Joomla Application for sending emails using gmail smtp server. I used it on my localhost and found to work correctly. But its not working on my remote host server. I am using the same settings for it. Can anyone reply me the problem. Its says that email could not be sent
Did you sent bulk mails, news letter and etc ?
if the answer is "yes", you should check your gmail account, because gmail smtp server has a smart bulk spamer recognition engine. so they may deactivated your smtp account because of sending about more than even 50 mails in last 10 mins.
so my suggestion is to forget gmail as your smtp server and start your own smtp server or buy a paid smtp account to do this.
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