| View previous topic :: View next topic |
viking
Joined: 04 Feb 2008 Posts: 2
|
Posted: Wed Feb 13, 2008 10:44 am Post subject: not recieving email |
|
|
|
ghandi problema bil contact form. L-emails mhumiex jasluli go viking(at)maltanet.net, min info(at)justinmifsud.com (email forwarding)
xtista tkun il problema pls?
| php: | <?php
// Contact subject
$subject=$_POST['subject'];
// Details
$message=$_POST['detail'];
// Mail of sender
$mail_from=$_POST['customer_mail'];
// From
$header="from: $name <$mail_from>";
// my email address
$to="info@justinmifsud.com";
$send_contact=mail($to,$subject,$message,$header);
if($send_contact){
echo "Message Sent!";
}
else {
echo "ERROR";
}
?> |
|
|
| Back to top |
|
|
yancho Site Admin
Joined: 13 Nov 2007 Posts: 56 Location: Iklin
|
Posted: Wed Feb 13, 2008 10:48 am Post subject: |
|
|
|
As I am presuming, you are using third party forwarding, which I do not encourage - the more variables you introduce the bigger the chance of an error.
Also some of your script is bugged, these are my corrections :
| php: |
<?php
// Contact subject
$subject= $_POST['$subject'];
// Details
$message= $_POST['$detail'];
// Mail of sender
$customer_mail = $_POST['customer_mail'];
//Your MAIN email
$mymail = 'info@justinmifsud.com';
$secmail = 'viking@maltanet.net';
// From
$headers = "From: ". $customer_mail . "\r\n" .
" Reply-To: ".$mymail. "\r\n" .
" X-Mailer: PHP/" . phpversion();
$headers2 = "From: ". $mymail . "\r\n" .
" Reply-To: ".$customer_mail. "\r\n" .
" X-Mailer: PHP/" . phpversion();
$send_contact=mail($myemail,$subject,$message,$header);
$send_contact2=mail($secmail,$subject,$message,$header);
$auto_reply = "This is auto reply \n\n Thanks";
$send_contact3=mail($customer_mail,'Thanks for your query',$auto_reply,$header2);
if(($send_contact) and ($send_contact2) and ($send_contact3)) {
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
|
Hope it helps
_________________
 |
|
| Back to top |
|
|
viking
Joined: 04 Feb 2008 Posts: 2
|
Posted: Wed Feb 13, 2008 10:51 am Post subject: |
|
|
|
| yancho wrote: | As I am presuming, you are using third party forwarding, which I do not encourage - the more variables you introduce the bigger the chance of an error.
Also some of your script is bugged, these are my corrections :
| php: |
<?php
// Contact subject
$subject= $_POST['$subject'];
// Details
$message= $_POST['$detail'];
// Mail of sender
$customer_mail = $_POST['customer_mail'];
//Your MAIN email
$mymail = 'info@justinmifsud.com';
$secmail = 'viking@maltanet.net';
// From
$headers = "From: ". $customer_mail . "\r\n" .
" Reply-To: ".$mymail. "\r\n" .
" X-Mailer: PHP/" . phpversion();
$headers2 = "From: ". $mymail . "\r\n" .
" Reply-To: ".$customer_mail. "\r\n" .
" X-Mailer: PHP/" . phpversion();
$send_contact=mail($myemail,$subject,$message,$header);
$send_contact2=mail($secmail,$subject,$message,$header);
$auto_reply = "This is auto reply \n\n Thanks";
$send_contact3=mail($customer_mail,'Thanks for your query',$auto_reply,$header2);
if(($send_contact) and ($send_contact2) and ($send_contact3)) {
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
|
Hope it helps  |
thanks vmuch
|
|
| Back to top |
|
|
varactor
Joined: 22 Dec 2008 Posts: 10 Location: Malta
|
Posted: Mon Dec 22, 2008 1:54 pm Post subject: |
|
|
|
What are you using a Windows Server or Linux?
If Linux check that your sendmail path is OK.
On Windows check php.ini for the smtp setting.
For example, on my Windows server the smtp setting is as follows..
( approx Line 698 )
[mail function]
; For Win32 only.
SMTP = mail.maltanet.net
smtp_port = 25
On Linux ( Debian ) everything should be OK by default, so an error have to be happening at the PHP script itself.
Good Luck, reply if you need any more help, and even if you have it fixed. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
Powered by phpBB © 2001, 2002 phpBB Group |
|
|