|
-
June 12th, 2008, 09:51 AM
#1
domains.com hosting PHP MAIL function dont work
i'm doing this
$headers = "From: [email protected]";
mail('[email protected]', 'My Subject', 'test',$headers)
mail returns FALSE which means failure, and i never get the email.
My host is domains.com , not free hosting.
-
June 12th, 2008, 11:54 AM
#2
Re: domains.com hosting PHP MAIL function dont work
PHP's mail() function only returns false if it cannot send the message to whatever is processing the mail (SMTP, sendmail, etc.). Since it is failing, that means that your server is not configured to send e-mail.
Since you are using a free service, there 99% chance that your hosting does not offer the ability to send mail.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 12th, 2008, 11:55 AM
#3
Re: domains.com hosting PHP MAIL function dont work
 Originally Posted by PeejAvery
PHP's mail() function only returns false if it cannot send the message to whatever is processing the mail (SMTP, sendmail, etc.). Since it is failing, that means that your server is not configured to send e-mail.
Since you are using a free service, there 99% chance that your hosting does not offer the ability to send mail.
i said its not free hosting, if you read more carefully
its paid hosting on domains.com
-
June 12th, 2008, 12:07 PM
#4
Re: domains.com hosting PHP MAIL function dont work
Sorry. My mistake.
Either way, you are going to want to check with your provider to see if they offer mail sending.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 12th, 2008, 06:14 PM
#5
Re: domains.com hosting PHP MAIL function dont work
Here is what they are telling me now,
i dont understand why i cannot just use the php mail function without all this?
From: Domains.com Support <[email protected]>
To: oswaldo <[email protected]>
Sent: Thursday, June 12, 2008 1:11:14 PM
Subject: Domains.com support (ticket# 10443)
Dear Oswaldo,
how to use PHP for your smtp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are few steps:
First of all, we need an email transport for your application.
Go to this link: http://sourceforge.net/project/showf...group_id=26031
- Download the zip file to your computer and expand all to your local folder.
- Create a new folder in your hosting. In this example I named the folder: php-mailer
- Upload all of the zip contents you have expanded in your local computer TO the php-mailer
folder at the hosting
Now, lets get the email script. Go to this link: http://www.enom.com/help/hostinghelp.asp?hosthelp=16
Open a new file in your text editor, cut and paste the code, and save it as sendemail.php.
In your editor, you might need to configure line 3-8:
$YourEmailAddress = '[email protected]'; //Email address you want the mail to go to
$Yourname = 'YOURNAME'; //Who the email is sent from - this is a name not an email
$MailUsername ='[email protected]'; //Email address you are using to send the email
$MailPassword = 'youremailpassword'; //This is the password of the email account used to send the email
$MailServer = 'smtp.yourdomain.com'; //Assigned mail server
$MailType = "HTML"; // Can use HTML or TEXT -case doesn't matter
Save the file.
Still in the editor, line 10:
require("class.phpmailer.php");
You need to point where the class is located. It's part of the mail transport package as described in section #1 above. So, in this case, if you follow the folder and file naming in this example, the command should be:
require("php-mailer/class.phpmailer.php");
The last one. Line 121:
<form name=\"form1\" method=\"post\" action=\"index.php\">
You need to change index.php to the same file name you're working right now. In this example, it should be:
<form name=\"form1\" method=\"post\" action=\"sendemail.php\">
Please notice, this email application is sending email using your email account you have created in your hosting or POP3 account. If you don't have any email account in your hosting (POP3), you might need to create it first.
With kind regards,
Chris
Domains.com Support Team
-
June 12th, 2008, 07:15 PM
#6
Re: domains.com hosting PHP MAIL function dont work
 Originally Posted by bulbish
i dont understand why i cannot just use the php mail function without all this?
Because their hosting does not support it.
Basically, what they have done is told you to use a PHP class which interacts with a separate e-mail account which you can set up with a different host.
Honestly, think about using 1&1 for hosting. They are the best and cheapest! And I use the mail() function all the time. Right now, they have some pretty sweet deals running.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 12th, 2008, 07:25 PM
#7
Re: domains.com hosting PHP MAIL function dont work
yeah man, domains.com sucks.
i'm making a small site for a guy, i gave him $80 quote, but ran into so many problems with this host it wasnt even worth for me. the site was pretty basic but i spend so much time trying to figure out those problems.
So you think i can use one of the domains.com's email addresses they gave me?
-
June 12th, 2008, 08:34 PM
#8
Re: domains.com hosting PHP MAIL function dont work
Sure. Just do a domain transfer. 1&1 has plenty of documentation on it. And, if worst come to worse, call them. They have excellent customer support.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|