when I send the email, if the subject says "Ç", it shows "?".
already tried to implement:
-charset="ascii";
-charset=UTF-8;
-$mail->$subject = "=?ISO-8859-1?Q?".imap_8bit("äöüßÄÖÜ sollte hier gehen")."?=";
-$mail->$subject = '=?UTF-8?B?'.base64_encode(utf8_encode("çççç")).'?=';
So far I can not solve this, what else can I do? I already searched in the forum has a lot of post to talk about it but none solved my problem.
My exemple code is :
$mail = new PHPMailer();
$mail->charset="UTF-8";
$mail->IsSMTP();
$mail->Host = "*.*.*.*:*";
$mail->SMTPAuth = false;
$mail->From = "*@*.*";
$mail->FromName = "newjob";
$mail->addAddress($add1, $addnome1);
if($add2!=""){ $mail->addAddress($add2, $addnome2);};
if($add3!=""){ $mail->addAddress($add3, $addnome3);};
$mail->ContentType = 'text/calendar; charset=utf-8';
$mail->$subject = "=?ISO-8859-1?Q?".imap_8bit("äöüßÄÖÜ")."?=";
// $mail->$subject = '=?UTF-8?B?'.base64_encode(utf8_encode("çççç")).'?=';
$ical = "BEGIN:VCALENDAR
";
$ical .= "VERSION:2.0
";
$ical .= "PRODID:-sigma.eda.pt
";
$ical .= "METHOD:PUBLISH
";
$ical .= "BEGIN:VEVENT
";
$ical .= "ORGANIZER;SENT-BY=\"MAILTO:$add1
";
$ical .= "ATTENDEE;CN=$add1;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=false:mailto:$add1
";
$ical .= "UID:".strtoupper(md5($event_id))."-sigma.eda.pt
";
$ical .= "SEQUENCE:".$sequence."
";
$ical .= "STATUS:".$status."
";
$ical .= "DTSTAMPTZID=Europe/azores:".date('Ymd').'T'.date('His')."
";
$ical .= "DTSTART:".$start."T".$start_time."
";
$ical .= "DTEND:".$end."T".$end_time."
";
$ical .= "LOCATION:".$venue."
";
$ical .= "SUMMARY:".$summary."
";
$ical .= "DESCRIPTION:".$descr."
";
$ical .= "RRULE:FREQ=MONTHLY;INTERVAL=".$rotina.";COUNT=".$repete.";
";
$ical .= "BEGIN:VALARM
";
$ical .= "TRIGGER:-PT15M
";
$ical .= "ACTION:DISPLAY
";
$ical .= "DESCRIPTION:Reminder
";
$ical .= "END:VALARM
";
$ical .= "END:VEVENT
";
$ical .= "END:VCALENDAR
";
$mail->Body = $ical;
try {
if ( !$mail->Send() ) {
// $error = "Unable to send the email <br />";
// throw new phpmailerAppException($error);
} else {
// echo 'Message has been sent<br /><br />';
}
} catch (phpmailerAppException $e) {
// $errorMsg[] = $e->errorMessage();
}
EDIT image error from test:
</div>