I'm looking for an SMTP server that I can setup on a windows machine:
It needs to be lightweight, not loads of security settings
I only need to send email not receive it
Its needs to be able to send email from anonymous users
The reason is that I've installed Apache and PHP on a windows machine and want an SMTP server to route mails through, I plan on using this windows sendmail.exe which I have used before and works great.
Last time I did this I used sendmail.exe and Stunnel and used a gmail address, but I can't do that this time, needs to be sent from localhost.
You could use the SMTP server integrated in IIS, you could also go for smaller mail servers like http://www.xmailserver.org/ or http://www.mailenable.com/
Too bad, stunnel/gmail is great and I've used it a ton for test environments.
Two great alternatives are to install exim via Cygwin, or to use IIS as an SMTP server.
I have personally used the first with success. I have never tried IIS although I know this is a viable solution for some.
Related
I have setup a Website based on HTML with the exception of a contact.php page. I am hosting this website on my Rasberry Pi 3 computer on Debian flavor of linux Jesse Light. This is headless as it hosts my Portfolio website. I am using Apache2 webserver and installed sendmail as my Mail Transfer Agent (MTA). The problem is I have been spinning my wheels researching for the past week and I am stuck.
My issue is I send email from my php contact page on my live server but nothing ever arrives in my inbox after sending it. I get a mail sent message from my php script after about a minute after sending but then Nothing arrives in the inbox. I am thinking My SMTP on my php.ini is not correct. I put my website domain name FQ name. I am using Microsoft Exchange Online hosted email domain by GoDaddy. Also, anyone have any good advise on what my from / to should be set to on my SMTP configurations?
Sounds like a direct reject to me.
Some hints:
check the SMTP logs from your MS Exchange server (if a connection has been opened and potentially been refused for whatever reason)
check the PHP / Apache logs and see, whether an PHP fatal error or warning occured (mybad bad credentials or wrong port?)
I have had bad experiences with MS Exchange server and SMTP, make sure its proper setup.
check the credentials and settings from an independent client to see if they work flawless.
Hope that helps. Otherwise please provide more details and log samples.
Is your contact.php program hosted on the Godaddy server? If yes- It's not possible to send mail through Godaddy shared hosting servers using your own SMTP settings. You can only send from Godaddy's relay server when using a shared hosting plan. If you wanted to be able to send through your own SMTP servers, you'd need to be hosting with either a VPS or Dedicated Server plan.
Check maillog on your server and you will get the smtp connection timeout errors.
Let me know, in case the problem is something different- will try to address it.
Is it possible to send mail to an exchange server that is running locally on our network using php-apache that is also running in a localhost? If its possible, can anyone point me to the right direction?
Thank You Guys in Advance
The easiest way is to just to install a local MTA like blatmail (assuming you're on Windows; if you're on Linux you have sendmail or an equivalent already and mail() should just work).
That said, assuming your Exchange server will forward without authentication from the local network, set SMTP to the address or hostname of your Exchange server in .ini (or ini_set "SMTP" to that in the script itself).
Note that the vanilla mail() doesn't support authentication, and I'm pretty sure doesn't support TLS.
So you should definitely only use it on a completely trusted network.
I use PHP's mail function to send emails from my server, which currently also handles mail. However, I would like PHP to start sending messages through a different SMTP relay, not the server it's running on. I checked out php.ini, and it appears that it is only possible to specify a different relay on a Windows PC, whilst my server is running OS X Snow Leopard. Is it possible to change the relay settings? Ideally, I wouldn't want to incorporate anything new into my PHP code, as I use the mail function all over the place.
You cannot do this without either setting up a sendmail alternative on your server that routes mail through SMTP, or much much easier, using a library like Swiftmailer.
PHP does not have the capability to use an external SMTP server built in (Unless you are on a Windows platform).
I'm building a site on my home computer using MAMP. The code I'm using employs the PHP mail() function to send emails, but whenever I test it, the mails aren't getting sent.
My computer is connected to the net, but I'm wondering if there's something about local hosting that prevents mails from getting sent. I'm not getting any kind of error message.
Any ideas?
PHP can send mail in one of two ways.
The first, and the default on non-Windows systems, is to use the local mail transfer agent installed on the system. This would be "sendmail" or an application compatible with it, the most popular probably being postfix.
The other is to connect via SMTP to some mail server.
You will either need to install a mail transfer agent on your local system (and set it up correctly), or edit PHP's configuration to specify an SMTP server address and port.
Yes, there are things that could block locally hosted mail. For one, your ISP could block SMTP to servers other than the ISP. ask your ISP support if they block SMTP... Or try telexing so someone's MX port 25 and do you get a response?
If your ISP blocks smtp you can still send the mail, but first you must relay that email through a hosted email server like your ISP mail server. This process is called 'smart hosting' and you can search for more info.
Even if you are not blocked on port 25, many sites will refuse or lose smtp traffic that originates from a dynamic or residential IP address, so again the smart host suggestion.
Also I suggest not using the built in mail() function in PHP... Use something that replaces and improves it like http://pear.php.net/package/Mail or http://sourceforge.net/projects/phpmailer/. Again, use the SMTP method as it is way more reliable than direct sending or calling Sendmail.
It is important to confirm this problem, doing SMTP manually over telnet. That way you isolate the problem from PHP. I did ISP support for years and saw this question lots. Most people setup php and mail correctly but get stuck on a background network issue with SMTP.
If you have Wireshark installed, it can record network traffic and you might see the actual SMTP traffic, for example the remote server may be refusing your connection. Wireshark is helpful but not required to solve this though. Good luck.
You need to setup SMTP server in order to be able use mail function, or you can use PHPMailer class, with it you can avoid using mail function and setup problems, PHPMailler need socket extension to be loaded in order to function correctly.
I'd like to test password recovery and similar email related features for a website.
I'm using PHP (cakePHP framework) and the syntax seems easy enough but I'm unsure of the email server setup.
I've looked around for a good tutorial but they aren't specific enough.
What is a quick and easy mail server to use locally? also... some initial steps to start up would be appreciated.
Test Mail Server Tool
xampp comes with a smtp server for sending mails from localhost, check out http://www.apachefriends.org
I've had good success with SMTP4DEV on a Windows box. It is open source.
You can see recent messages fairly easily with this tool. All it requires is that in your application you use localhost as the SMTP server.
From what I remember PHP has a config file has a entry for the SMTP server. You can get a local SMTP server and point ini for PHP to localhost.
On Windows Microsft Internet Information Server would have SMTP, I think even client will have an SMTP relay (may not be a full server however). or I am sure you can find numeros free SMTP server.
You could look at Post Case although I don't believe it is now (currently) free - it used to be, or you could look at Hamster 2.1 which is free, and then there is hMailServer 5.x.