Sending mail by SMTP encoding problems

Permalink
Hello!
I've got a code which sending form by SMTP. The problem is that I'm recieving message with bad characters for example:
this what I'm expecting:
Wiadomość została wygenerowana automatycznie.
this is what I'm recieving:
Wiadomość została wygenerowana automatycznie.
the code I'm useing is:
<?php 
$imie_nazwisko = $_POST ['imie_nazwisko'];
$email = $_POST ['email'];
$termin_realizacji = $_POST ['termin_realizacji'];
$temat = $_POST ['temat'];
$wiadomosc = $_POST ['wiadomosc'];
$msg = '<html>
<head>
<title>Wiadomość ze strony</title>
</head>
<body>
<table>
  <tr>
    <td><strong>Imię i nazwisko:</strong></td>
    <td>' . $imie_nazwisko . '</td>

 
ramonleenders replied on at Permalink Reply
ramonleenders
Why not use the default mail helper? Perhaps that will do the trick for you! :)

$mh = Loader::helper('mail');
$mh->setSubject(‘Simple Message’);
$mh->setBody(‘This is my simple message body.);
$mh->to(‘info@test.com’, ‘The Name’)
$mh->from(‘noreply@yourdomain.com’);
$mh->sendMail();


You can setup SMTP in your dashboard, just type in "SMTP" in your search bar et voila.

P.s.: You can also load a mail template. HTML can be used within templates too!

$mh->load(‘your_template’);
tzmudzinski replied on at Permalink Reply
Ok thank you,
but the problem is that I can't use function sendmail();
(it's disabled by my host provider)
So I need to use SMTP.
ramonleenders replied on at Permalink Reply
ramonleenders
No problem at all.

You can setup SMTP in your dashboard, just type in "SMTP" and click on "SMTP Method". Then click on "External SMTP Server" at the newly loaded page and fill in your mail server, username, password and port (if not default)!
tzmudzinski replied on at Permalink Reply
That works perfect!!!
Thank you very much!
But, I have one more question:)
Is there any easy way to add record to Form Result in dashboard?