chetbyeme
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 1
Hii, so i was trying to send some emails of confirmations, like the ones when you buy something, and i'm not reciving the email in the acount that it should, i've been using the x10hosting email account here is the code i use to send the message:
<?php
$to = "chetbyeme@gmail.com";
$bcc = "noreply@chetbyeme.com";
$subject = "Pedido correctamente realizado";
$date = date("l, F j, Y \a\\t g:i A");
$body = "Nuevo pedido realidazado.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -";
$headers = 'Content-type: text/plain' . "\r\n" .
'From: ChetByEme <noreply@chetbyeme.com>' . "\r\n" .
'Reply-To: <chetbyeme@gmail.com>' . "\r\n" .
'Bcc: ' . $bcc . "\r\n" .
'MIME-Version: 1.0' . " \r\n" .
'X-Mailer: PHP/' . phpversion();
// Send the email
if (mail($to, $subject, $message, $headers)) {
echo "¡El mensaje se envió correctamente!";
} else {
echo "Hubo un error al enviar el mensaje.";
}
?>
also, i haven't used php mail so i don't know if anything is wrong, also if there is any problem with x10hosting mail accounts i can use a IONOS mail account to send it? and if it's posible, how can it be done?
Thanks!
<?php
$to = "chetbyeme@gmail.com";
$bcc = "noreply@chetbyeme.com";
$subject = "Pedido correctamente realizado";
$date = date("l, F j, Y \a\\t g:i A");
$body = "Nuevo pedido realidazado.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -";
$headers = 'Content-type: text/plain' . "\r\n" .
'From: ChetByEme <noreply@chetbyeme.com>' . "\r\n" .
'Reply-To: <chetbyeme@gmail.com>' . "\r\n" .
'Bcc: ' . $bcc . "\r\n" .
'MIME-Version: 1.0' . " \r\n" .
'X-Mailer: PHP/' . phpversion();
// Send the email
if (mail($to, $subject, $message, $headers)) {
echo "¡El mensaje se envió correctamente!";
} else {
echo "Hubo un error al enviar el mensaje.";
}
?>
also, i haven't used php mail so i don't know if anything is wrong, also if there is any problem with x10hosting mail accounts i can use a IONOS mail account to send it? and if it's posible, how can it be done?
Thanks!