Changes between Initial Version and Version 1 of Ticket #15448, comment 69
- Timestamp:
- 06/26/2025 04:31:07 PM (11 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15448, comment 69
initial v1 23 23 1. Setup the email server, in my case, my PR 8555 with `wordpress-develop` and Mailhog 24 24 2. Setup in WP the connection with PHPMailer to the local server 25 3. Add the code belowanywhere where it can be executed (including wp-load.php and executing such function)25 3. Add the code in supplemental artifacts, anywhere where it can be executed (including wp-load.php and executing such function) 26 26 4. ❌ The email is received, but no trace of two `multipart` sections as reported 27 27 5. 🐞 The email is not multipart by default, this is the real problem. … … 139 139 140 140 But before taking a final conclusion, I need to dig a bit more into the behaviour of PHPMailer. Many users, including @dd32 and some in the post of Stack Exchange, have reported that PHPMailer is the culprit in this history. 141 142 === Supplemental Artifacts 143 Test code 144 {{{ 145 // Set $to to an hotmail.com or outlook.com email 146 $to = "YourEmail@hotmail.com"; 147 148 $subject = 'wp_mail testing multipart'; 149 150 $message = '------=_Part_18243133_1346573420.1408991447668 151 Content-Type: text/plain; charset=UTF-8 152 153 Hello world! This is plain text... 154 155 156 ------=_Part_18243133_1346573420.1408991447668 157 Content-Type: text/html; charset=UTF-8 158 159 <html> 160 <head> 161 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 162 </head> 163 <body> 164 165 <p>Hello World! This is HTML...</p> 166 167 </body> 168 </html> 169 170 171 ------=_Part_18243133_1346573420.1408991447668--'; 172 173 $headers = "MIME-Version: 1.0\r\n"; 174 $headers .= "From: Foo <foo@bar.com>\r\n"; 175 $headers .= 'Content-Type: multipart/alternative;boundary="----=_Part_18243133_1346573420.1408991447668"'; 176 177 178 // send email 179 wp_mail( $to, $subject, $message, $headers ); 180 }}}