Testing website mailing locally - php

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.

Related

what properties should be set for my SMTP

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.

Need to run SMTP on localhost with October CMS / Laravel

I have an instance of October CMS running on my localhost, and I need to send emails to various internal addresses (within the company I work for) via the Mail configuration using SMTP Method (as requested by my superior). I had emails working fine using the PHP Mail Method with the addition of SSMTP to my system. However, for me to do this I was tunneling emails through my personal Gmail account, and we certainly don't want to do that! (By "we" I really mean "I") So, if anyone has any clues as to how I should go about this, I would greatly appreciate it!
First of all, create your email server.
Windows -> hMailServer
Others systems (Linux) : there are many options, find your best. Google it.
After, foward your port. Check this website, many ads.
Finally, October part. Go to config/mail.php. And change your SMTP server setting to yours.
But, I don't recommand this. Why? Because fowarding port can be dangerous, sometimes. You also have to turn your computer on if people want to reply you.
Instead, use your compagny mail server and change the setting to your compagny. Simple as that (-:.
Hope this help,
FelixINX

Looking for SMTP server for use with windows

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.

Sending mail in PHP using Exchange SMTP

I have a client that uses Exchange (although I'm not sure which version). From what I know, they do have an SMTP for their Exchange however supposedly I cannot use it since my system is on PHP+Linux. It will not work for the Exchange being on Windows licensed server. How true is it? I am trying to send the mail through SMTP and not directly to the Exchange server.
They did give the details on the SMTP and I have tried and yes, it doesn't work. I got an error 'Could not connect to SMTP host'.
What are my other options in sending mail through PHP? Been googling around and found something called WebDav. Would that be a wise choice?
EDIT>
I guess something went right overnight however it's not everything. I can (presumably) connect to the SMTP however I can't send email to other domains. I tried sending to it's own domain and it works. Checked my inbox and the email is there however if I send to Live or GMail, it doesn't work. It gives me this error:
PHPMAILER_RECIPIENTS_FAILEDemail#email.com
The email#email.com is a correct existing email. I have even tested with GMail and there's no problem in sending. Now what I would like to know is where the problem lies. Could it really be in the coding or the SMTP server?
As an extra note, I'm using Joomla 1.5.22.
They are incorrect. SMTP is a standardized protocol and has nothing to do with the operating system used from a client. Exchange has a few particular things that are somewhat odd about how it handles SMTP but they will more than likely not matetr for you.
If you're getting a 'Could not connect to SMTP host', that's a pretty fundamental issue it means one of several things:
The server is not accepting inbound SMTP from anyone
The server is not accepting inbound SMTP from your IP
There is a firewall getting in the way.
There are a lot of ways to troubleshoot this. The easiest, assuming this is a server that should be accessible to the general internet, is to, from a command prompt, run 'telnet 1.2.3.4 25' (where 1.2.3.4 is the IP where the server should be). If that connects, then see if you can run the same command from the machine where your PHP is. If not, tell the client that you can't seem to access SMTP from the outside and see if they can troubleshoot.
You could use gmail? I know you might not be using phpmailer, but the how-to should set you in the right direction.
It sounds like "they" (who I'm guessing are the sys-admin for the network you're on?) may have other ideas on you doing this though - ports could be restricted etc.

devel WAMP stack with mail server and open SSL

I'm developing an application that requires testing email.
I'm currently using wampserver, but it doesn't come with a mail server and setting one up has been a pain.
Also if I use an external mail server like yahoo, I run into issues because wamp doesn't come with SSL which yahoo's mail server requires.
So I'm trying to save myself from all this headache. I'm looking for a new development environment that comes "out of the box" with a mailserver and open SSL. Clearly that's not wampserver2. What does?
As already said in your other question, XAMPP does.
Pretty much any reasonably popular Linux distro has these built-in.
As i said in another question - settle fake GMail account and use PHPMailer.
http://phpmailer.worxware.com/index.php?pg=exampleagmail

Categories