I'm using mac OS snow leopard, and i have probs with mail, i'm not sure is it something about gmail, or php mail() func.
It's not working. I wrote it this way (just for testing ).
mail('something#example.com', 'My Subject', 'My Message');
I done * i need with postfix configuration, but it's not working (can't get the mail).
Any help, just need explanation on how things work. I'm googling last 3-4 hours, but nothing (didn't find the right answer). And yes, i'm using local server.
Thanks!
If your application is hosted in local host the mails will not be able to send. Upload to a live server and check it. (You need a mail server to send the mails)
Just a tip - if something isn't working, try and find the problem withing your code before blaming gmail or php functions. These have been tested and re-tested in live environments by literally millions of people.
Do you have a mail server installed and configured? Do you have Apache sendmail enabled?
Related
So I downloaded the Free Edition of MAMP free, and found out that it doesn't initially allow sending mail through PHP.
My question is very simple. What is the best and easiest way to enable it?
Thanks in advance.
This is probably not really the answer you are looking for, but if you're set on sending emails try a program like https://github.com/PHPMailer/PHPMailer
it will enable you to send emails through an SMTP server (like gmail). It will make sure your emails get delivered while working on localhost. When going live you could tell it to use PHP mail in the config (which is actually never recommended because of the spam factor and limited functionality).
That being said, while on localhost it shouldn't be necessary to send emails. Being that localhost usually implies a staging/development surrounding. What I like to do is output the to be sent email to my error log.
http://us3.php.net/manual/en/function.error-log.php
You can instantly tell how it looks and you get confirmation that your script has run that part.
It is not possible for you to send email from local server like WAMP,XAMP.
I looked around for this one but I just can't find this anywhere.
I have a turnkey Linux server setup on an EC2-Instance on Amazon. It has Sendmail installed and Postfix (Standard installation, I did not install either of these). When I send mail using PHP function mail(), and I use a .com email address such as me#gmail.com, it delivers the mail just fine. But when I try something more exotic like user#company.co.uk, #company.net, #company.nl etc. I won't deliver the mail.
According to webmin, postfix is being used.
Does anyone have any experience with this?
Any help would be very nice. Thank you.
It could have recognized it as SPAM. Check the SPAM directory.
Hy !! i have a big problem, i have an Ubuntu 10.10 with php 5.3.2, I use phpmailer to send mails and the function works like a month ago. But know, it just said, SendEmail with the php mail, or with the phpmailer say's send!!!
The messages never arrived!! with the 2 functions, i dont know if the php.ini get moves , or somethings else.
All scripts were tested in other servers ( digital ocean ) and they work perfectly.
But know in this server, is not working.
The time I execute #linux: mail.php , its inmediatly, and send my message " SEND MESSAGE".
In Gmail, I already check if where at Spam , but they neever arrived.
No firewall, Ubuntu 10.10, phpmailer lasta version, php 5.3.2
i check with a Python Script with same configurarion in the same system and works!!!
but with php nothing works!
Please help!!
You need contact the digital ocean support and open a ticket. Same happened to me and I found that they have a block by default for new accounts (to avoid spammers). You need open a ticket ans inform your situation.
When I do this, minutes after they check some information and my mail start to work :)
I'm developing a website that will utilize PHP's mail() function. I'm running MAMP Pro (primarily because it has the Postfix feature that is supposed to be useful for sending emails). I feel like I've tried everything, but my program still won't send emails. It doesn't even really matter to me that I use mail(). I just want to be able to send emails from my local MAMP Pro webserver so I can test out my website. Any suggestions would be greatly appreciated!
You need to set it up for your ISP.
http://documentation.mamp.info/en/mamp-pro/server/postfix
also
http://blog-en.mamp.info/2009/09/how-to-sending-emails-with-mamp-pro.html
Other than that, I agree with the comments. What is your ISP? What is php telling you? Also, read your logfile for postfix and tell us what it says:
http://blog-en.mamp.info/2010/03/how-to-show-postfix-log-file-of-mamp.html
I'm running my own LAMP server locally.
Something i need to setup?
Should it be able to send email using php-mail,
without havin to configure smtp.
Check your phpinfo() information for STMP and the port. Do a test.php file and try to execute this.
mail('email#example.com', 'My Subject', 'Hello World');
http://drupal.org/node/11570
That thread will help you out.
Drupal basically patches into the php mail function, so as with that you either need a mail server installed locally with your lamp setup, or to point apache towards an external or smtp server in your php.ini file.
Ah fixed it, well i didn't-one of our developers did.
Apparently Drupal only uses 'Send Mail' so you have to have it installed, wont use php-mail.
For future reference/research:
try the Drupal module SMTP Authentication Support. I have yet to test it.