Jump to content

mail() questions


anatak

Recommended Posts

on the mail() page I read this

Message to be sent.

 

Each line should be separated with a LF (\n). Lines should not be larger than 70 characters.

and then

Caution

 

(Windows only) When PHP is talking to a SMTP server directly, if a full stop is found on the start of a line, it is removed. To counter-act this, replace these occurrences with a double dot.

<?php

$text = str_replace("\n.", "\n..", $text);

?>

 

Here are my questions

how do you cut a text in lines ? I was thinking using chunk_split() but maybe you know a better way.

how do you know if "php is talking to a SMTP server directly" ? is this depending on where the site is hosted ? Can you test if you are on a windows box and talking to a SMTP server ?

do the \n count for the 70 characters ? (so you would cut your string in 68 character pieces and put the \n behind every piece)

how can you make sure that you don't chop Unicode characters in half with the chunk_split() functions ?

 

kind regards

anatak

Link to comment
https://forums.phpfreaks.com/topic/83545-mail-questions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.