Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

306
Vistas
send email with alias using phpmailer. make sender from alias

I am trying to setfrom to be alias email. I created alias email in gmail. and i set it as default sender so if i send normal email from gmail it is working fine. but when i send email from phpmailer the receiving emails showing the original email and alias email. and my code working with port 465 and ssl. if iam butting it to port 587 and tls doing no thing(phpmailer) not working.

enter image description here

$mail = new PHPMailer(true);
        $mail->isSMTP();
        $mail->SMTPAuth   = true;
        $mail->SMTPSecure = 'ssl';
        $mail->Host = 'smtp.gmail.com';
        $mail->SMTPDebug = 2;
        $mail->Port = 465;
        $mail->IsHTML();
        $mail->Username = 'original email';
        $mail->Password = 'app password';
        $mail->SetFrom('alias email', '');
        $mail->Subject = 'Massage from alias.';
        $mail->Body    = 'test';

        $mail->addAddress('send to', 'ToEmail');
        $mail->send();

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda