Mails are created only in .txt format


  • | 2489 points

    Hi,
    I'm having issues sending mail via mail() native script (I'm in a very restrictive environment and I can't use other stuff)
    The emails are created, but with a .txt extension and they are not more than To, Subject and headers parameters followed by the HTML message
    I also installed MailHog with no luck (mails are always saved in the output folder with a .txt extension, and they are not "forwarded" to MailHog)
    I haven't installed any mail client (as I said, the environment is restrictive), can this be the cause?

    Thanks


  • | 386 points

    @ivanhalen Maybe you can elaborate on how restrictive your environment is. Can you use the PHPMailer() class (adding the sources to your project), do you have access to a smtp mail server to apply authentication? The standard PHP Mail() function is considered unsafe and easily abused for sending spam.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.