Help - Search - Members - Calendar
Full Version: Php Mail()
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
Pixl
Hello,

I have a problem with my post.php script. If I use it online, and I post a something with that script, it says that my message has been sended succesfully. But, I never receive the message on my email... is this because php mail() isn't supported or something? Here is my php script, may be I made some mistakes?

CODE
<?php
$yoursite = "http://jjwd.uuuq.com/"; // Jouw site-naam en/of url
$recieve_email = "noreply@lakitna.nl"; // email adres waar de email naar toe word verstuurd (ontvanger)

// Function validate runs all of the checks like empty fields.
function validate()
{
// if fist name is empty: throw error
if (empty($_POST['name_first'])) { $r.= "Vul uw naam in.<br />"; }
// if email is empty: throw error
if (empty($_POST['email'])) { $r.= "Vul uw email adres in.<br />"; }
else
{
// if email is not a correct email adress: throw error
if (preg_match('/.*@.*\..*/', $_POST['email']) > 0) {}
else { $r.= "Vul een geldig email adres in.<br />"; }
}
// if subject is empty: throw error
if (empty($_POST['subject'])) { $r.= "U heeft geen onderwerp ingevoerd.<br />"; }
// if message is empty: throw error
if (empty($_POST['message'])) { $r.= "U heeft geen bericht ingevoerd.<br />"; }
return $r;
}
$result = validate();

// if the submit button is clicked
if ($_POST['submit'])
{
// if the function validate is empty (everything is correct)
if ( empty($result) )
{
// mail content
$mail = "Via het contact formulier op ".$yoursite." is door ".$_POST['name_first']." ".$_POST['name_last']." het volgende bericht gestuurd.";
$mail.= "\n\n"."Onderwerp:"."\n".$_POST['subject'];
$mail.= "\n\n"."Bericht:"."\n".$_POST['message'];
$mail.= "\n\n"."Contact email:"."\n".$_POST['email'];
// mail subject
$mail_subject = $yoursite." - ".$_POST['subject'];
// mail headers
$headers = 'From: Contact form <'.$_POST['email'].'>'."\r\n";
// send the mail
mail($recieve_email, $mail_subject , $mail , $headers);
// succes message
echo "<fieldset>Email is succesvol verstuurd.</fieldset>";
}
// if the function validat is not empty (there is a error)
else
{
// display the errors
echo "<fieldset>".$result."</fieldset>";
}
}
?>


Thx for the assistance!
swordz
php mail() is disabled to deter spammers. It can be enabled for $10. Talk to Jack or Bread on the IRC.

swordz
kevin_k
Hi All:

I talked to Bread in IRC about this issue and received the instructions I need to get mail() enabled. However, a question comes to mind. Does the charge apply to each hosted site individually or is the charge applied to all of a webmaster's hosted sites together?

I'm creating a website account registration system, which includes, a registration app, a sign-in app and an account management app. They all require the mail() function to send activation and change of settings confirmation email to the site's users.

Right now I only have one Zymic hosted website ( kevtek.uuuq.com ), but a new project may require me to setup a project site and each site will use the account system. So the question becomes, will each require $10 or does the $10 charge apply to both sites...?

Thanks in advance.
Jack
The $10 fee is charged for each specific account. However in the future we will offer slight discounts for more than 1 account.
Bogey
Is SMTP available here? If so, try the following class.

http://www.ozzu.com/programming-forum/smtp...26.html#p551898

And a usage to that class (that works perfectly.. not that usage example I showed in the above post)... is...

http://www.ozzu.com/programming-forum/pars...91.html#p552859

Thats, of course, if there is SMTP here.... or you could use GMAIL's SMTP server.
swordz
SMTP is not available here, nor will you be able to connect to an external smtp server such as Gmail's.

swordz
Rocco
Is the $10 a once off payment as opposed to monthly?

And, are there any limitations on the amount of php emails that i am able to send?

Rocco
Dave

It is one off and there are no limitations.
Rocco
If the php mail gets sent out would the recipient see it as being sent from the person specified as the sender in the php's mail function or would it be sent as something like mail has been sent from a server on behalf of the specified sender?

Rocco
electric_master
I have a question:

If you are ready to pay for it, how do we pay for it? Like, what payment type?
Jacob
You speak to Jack/Bread on the zIRC. It is $10 USD payable by PayPal.

Jacob.
electric_master
QUOTE(NaRzY @ Jul 21 2009, 07:57 AM) *
You speak to Jack/Bread on the zIRC. It is $10 USD payable by PayPal.

Jacob.


Ok. I need to get a paypal XD
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.