Sending emails with php using x10hosting free email account

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!
 

ctyrd

Active Member
Messages
913
Reaction score
79
Points
28
I have already created the accounts, and even with that i can't send an email to my gmail with the php script, well more like i don't recive them in my gmail
DNS for chetbyeme.com is not setup to use the x10 free email server or mail(). Script would need to use SMTP auth to send email. Can you send//receive from http://chetbyeme.com/roundcube/ or http://x12.x10hosting.com/roundcube/


There is no site to speak of at http://chetbyeme.com/

No one in the world wants unsolicited or phishing email.
 
Last edited:

chetbyeme

New Member
Messages
3
Reaction score
0
Points
1
DNS for chetbyeme.com is not setup to use the x10 free email server or mail(). Script would need to use SMTP auth to send email.


There is no site to speak of at http://chetbyeme.com/

No one in the world wants unsolicited or phishing email.
Okay, So i haved changed the MX records to the ones that gave me the X10hosting when created the free mail account, and de NS to the x10hosting ones, this should solve it? Or do i need to do something more?
 

ctyrd

Active Member
Messages
913
Reaction score
79
Points
28

baps

New Member
Messages
1
Reaction score
1
Points
1
Hi Guys, I am new to the forum and I read all your comments. I was having the same issues to set up php mail but I finally got it to work by using of course mail host: x14.x10hosting.com and username & pw: full email address and pw, the mail incription should be tls and port 587. PLEASE NOTE YOU NEED TO ENABLE DKIM in order to receive or send emails if not GMAIL will block your outgoing emails if sending there. DKIM can be found the menu next to where you create your email in the hosting panel. This protocol allows your email to authenticated globally. I did not touch anything else and it works now: sending and receiving emails through php script. Thanks!
 

fusio

New Member
Messages
19
Reaction score
0
Points
1
Hello baps.
that's not working for script php with function mail().
I have this code:
$user = $_POST['usuario'];
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$tel = $_POST['tel'];
$mensaje_form = $_POST['mensaje'];
$para = 'selfiuzf@damanyer.x10.mx' . ", "; // atención a la coma
$para .= 'damanyerweb@gmail.com';
$titulo = 'Correo de usuario';
// mensaje
$mensaje = '
<html>
<head>
<title>Correo de '. $user .'</title>
</head>
<body>
<div style="text-align:center">
<h1>Correo de DemanyerWeb - Blog</h1>
<img src="http://nube.x10.mx/assest/img/logo.png" width=150>
<h3>Usuario: '. $user .'</h3>
<h3>Nombre: '. $nombre .'</h3>
<h3>Email: '. $email .'</h3>
<h3>Telefono: '. $tel .'</h3>
<h3>Mensaje: '. $mensaje_form .'</h3>
<p>Este es un correo que un usuario envio desde tu DamanyerWeb</p>
</div>
</body>
</html>
';
// Para enviar un correo HTML, debe establecerse la cabecera Content-type
$cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$cabeceras .= 'From: De:' . $email . "\r\n";
mail($para, $titulo, $mensaje, $cabeceras);

NOTE:
this script send to my hosting free account email x10hosting.com, but don't send to my account gmail. even not appear in the folder spam
 

ctyrd

Active Member
Messages
913
Reaction score
79
Points
28

spacresx

Community Advocate
Community Support
Messages
2,183
Reaction score
195
Points
63
x10 support officially does not provide scripting support.
however suggestions may be made by other users.
 
Top