• Resolved SB_beginner

    (@sb_beginner)


    Hi all,

    I’m trying to get the e-mail to post fuctionality up and running and I’m almost there except for the format of the blog entry. First off the Content-Type is added at the start of the post and then for some reasons an = is added to the end of each line. I’m hoping this is simple to fix. Any help would be much appreciated.

    See below for an example of an e-mail to post. I want to send the e-mails in HTML format so I don’t need to re-format them manually.

    Content-Type: text/html; charset=UTF-8

    Hello world. This is a test e-mail post. I have no idea how well it will=
    work therefore I need to test it more. hsdjkhsddb sdbjd dsdgs dsdgsdsd wey=
    twywua nlaikeya aylaabs dyud shayeg a ggret a gstre akeooete alooet a anate=
    a aieuyebsbnbst auaghjb dybdte andhdte amhdte djdgteb sd dudedteye smdo

    Here is what I am sending in my HTML e-mail

    <p>Hello world. This is a test e-mail post. I have no idea how well it will work therefore I need to test it more. hsdjkhsddb sdbjd dsdgs dsdgsdsd weytwywua nlaikeya aylaabs dyud shayeg a ggret a gstre akeooete alooet a anate a aieuyebsbnbst auaghjb dybdte andhdte amhdte djdgteb sd dudedteye smdo</p>

Viewing 11 replies - 1 through 11 (of 11 total)
  • What email client are you using to send the emails?

    Thread Starter SB_beginner

    (@sb_beginner)

    roundcube, the free webmail client that comes with cPanel

    Thread Starter SB_beginner

    (@sb_beginner)

    I just tried using horde instead and it’s fixed the problem.

    Thanks anyway

    That’s interesting. What about SquirrelMail?

    Thread Starter SB_beginner

    (@sb_beginner)

    I haven’t tried SuirrelMail yet.

    I have a new issue now. The e-mail is being split into lines which can make the blog entry look odd. I’ve been looking in the get() function in the class-pop3.php file and it looks like the e-mail is split into an array of lines with no consideration for where it’s splitting the line. For instance lets say you want to add an image in your blog post from HTML e-mail like so <img src="https://www.someDomainName.com/SomeFile/SomeImageLocation/SomeFileNameXXXXXYYYYYYZZZZZZ.jpg"/> then it’s possible that this will be split across two lines breaking the code. Has anyone else had this issue and do they have a work around. I read somewhere that lines of text should be limited to n characters per line but what’s the use in that.

    anyone have any ideas?

    Can I ask why you are using web mail to post via email? Doesn’t that kinda defeat the purpose of posting by email?

    Thread Starter SB_beginner

    (@sb_beginner)

    Two reasons first off I’m just testing at the moment
    Second I’m using it to update many blogs from the same e-mail, including blogger blogs. The blogger ones a displaying fine without any problems but it seems that wp splits the e-mail into lines which I really don’t see the point of doing as when sending HTML it’s dangerous as it breaks the formatting and code which is the whole point of HTML.

    Any ideas on a solution?

    For testing purposes, I’d suggest using an email client such as Thunderbird. Webmail is quite different and its configuration could vary from host to host.

    Thread Starter SB_beginner

    (@sb_beginner)

    Ok so I’m using thunderbird now but it still re-formats the HTML code that I send via e-mail.

    This is what I send

    <p>Hello world. This is a test e-mail post. I have no idea how well it will work therefore I need to test it more. hsdjkhsddb sdbjd dsdgs dsdgsdsd weytwywua nlaikeya aylaabs dyud shayeg a ggret a gstre akeooete alooet a anate a aieuyebsbnbst auaghjb dybdte andhdte amhdte djdgteb sd dudedteye smdo</p>

    and this is what it becomes.

    <p>Hello world. This is a test e-mail post. I have no idea how well it
    will work therefore I need to test it more. hsdjkhsddb sdbjd dsdgs
    dsdgsdsd weytwywua nlaikeya aylaabs dyud shayeg a ggret a gstre akeooete
    alooet a anate a aieuyebsbnbst auaghjb dybdte andhdte amhdte djdgteb sd
    dudedteye smdo</p>

    It splits the code across multiple lines which is not what I want. I can understand this happening in plain text but HTML has all the formatting and it’s being broken by the get() routine.

    Anyone have any ideas on a work around?

    Thread Starter SB_beginner

    (@sb_beginner)

    Ok so I finally managed to figure out a fix for this issue and thought I would share it in case anyone else has the same problems.

    In the file wp-mail.php there is a line of code (Line 70):

    $content.= $line;

    This basically adds all the lines of the body of the message together. The thing is the $line has CR & LF added to the end of it. Therefore change the code to:

    $content.= preg_replace('/\r\n/','',$line);

    this removes the CR & LF from the end of each line. It’s important to note that this is only the desired outcome in HTML format. If you’re sending plain text e-mails then you may want CR & LF and this will remove them. HTML formatting is taken care of by the HTML tags.

    Any one about roundcube?

    i need to post by posts via email. Any one can help me to get posts from roundcube and show it in my blog page

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘E-mail to post’ is closed to new replies.