Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.