kgp43
asked on
Can't send email
Hi,
I have a weird problem.
I use the following function to send emails from my support form on my website, but it simply stopped working, no email is being received in my helpdesk from this form.
Have tried to send and email manually from my private email account to the same "receiver/helpdesk email" and it works fine.
So I wonder, is there an error in this coding (I removed the parameters for error checking)?
I have a weird problem.
I use the following function to send emails from my support form on my website, but it simply stopped working, no email is being received in my helpdesk from this form.
Have tried to send and email manually from my private email account to the same "receiver/helpdesk email" and it works fine.
So I wonder, is there an error in this coding (I removed the parameters for error checking)?
# Send email to contact
function contact() {
$name = "Kenneth";
$email = "my@email.com";
$title = "A message";
$message = "The message";
# Send the email
if(mail("mail@domain.com", $title, $message, "From: $name <$email>\nX-Mailer: PHP/" . phpversion())) {
return true;
}else{
return false;
}
}
try this:
btw, are you using gmail address as sender?
also you might get filtered, is this your server? are you using paid mail server/host?
$name = "Kenneth";
$email = "my@email.com";
$title = "A message";
$message = "The message";
$headers = "From: $name <$email>\r\nX-Mailer: PHP/".phpversion();
# Send the email
if(mail("mail@domain.com", $title, $message, $headers)) {
return true;
}else{
return false;
}
}
btw, are you using gmail address as sender?
also you might get filtered, is this your server? are you using paid mail server/host?
ASKER
Hi,
I't's not gmail. My own domain and own server.
The helpdesk settings etc are setup correctly (I can receive emails from all my private email accounts).
I will try what you suggested.
I't's not gmail. My own domain and own server.
The helpdesk settings etc are setup correctly (I can receive emails from all my private email accounts).
I will try what you suggested.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works fine now, must be an issue with the helpdesk settings (zendesk).
Thanks for your help :)
Thanks for your help :)
no problem, good luck.
ASKER