Current location: Hot Scripts Forums » Programming Languages » PHP » E-mails from online platform


E-mails from online platform

Reply
  #1 (permalink)  
Old 11-03-06, 04:25 AM
gigafare gigafare is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
E-mails from online platform

I've been having this problem for a while:
I'm trying to send an HTML e-mail from within my CMS but the second I
add a picture
use a background color
...

It goes wrong.

I use the FCKeditor for this.

Screenshot editor: http://www.vhtechnology.com/mailing_good.jpg
Screenshot code: http://www.vhtechnology.com/mailing_code.jpg

Screenshot badly received e-mail: http://www.vhtechnology.com/mailing_bad.jpg

Code for sending e-mails in the PHP page
PHP Code:

//print_r($emails);

        
$contenttype 'text/html';
        
$extra "MIME-Version: 1.0\nContent-Type: $contenttype;charset=iso-8859-1\nX-Priority:3\nX-MSMail-Priority: Normal\nFrom: noreply@".$config['sitename']."\n"
Reply With Quote
  #2 (permalink)  
Old 11-03-06, 05:32 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
if you want to send images together with an email you have to send them with the email, or link them to a website (when the user is offline, he wont see the images)

when i look at the bad_email, i think this is a css-html problem, and it has nothing to do with the email itself.

I myself send lots of emails with html content, using css to modify the layout, and everything works fine.

Could you post your entire html mail code here? cause the image only contains a part of it

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 11-03-06, 06:12 AM
gigafare gigafare is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for your help.

I figuered: if i link to an absolute adress it wouldn't be a problem? So instead of img/name.jpg linking to www.domain/img/name.jpg ?
Obviously there's a little bit more to it than that.

PHP Code:

<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#f3f3f3">

    <
tbody>
        <
tr>
            <
td>
            <
table height="25" cellspacing="0" cellpadding="0" width="80%" align="center" bgcolor="#216594">
                <
tbody>
                    <
tr>
                        <
td>
                        <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; MARGIN-RIGHT: 3px"><font face="arial" color="#ffffff" size="2">GRATIS Nieuwsbrief van Beurstip.com</font> </p>
                        </
td>
                    </
tr>
                </
tbody>
            </
table>
            <
table height="125" cellspacing="0" cellpadding="0" width="80%" align="center" bgcolor="#42519c">
                <
tbody>
                    <
tr>
                        <
td><img src="http://www.beurstip.com/nieuw/img/logo.jpg" alt="" /> </td>
                    </
tr>
                </
tbody>
            </
table>
            <
table cellspacing="0" cellpadding="0" width="80%" align="center" bgcolor="#e7eff7">
                <
tbody>
                    <
tr>
                        <
td width="20%">
                        <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; MARGIN-RIGHT: 3px">Hier komt de linkertekst </p>
                        </
td>
                        <
td width="80%">
                        <
table cellspacing="0" cellpadding="0" width="100%">
                            <
tbody>
                                <
tr>
                                    <
td>
                                    <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; MARGIN-RIGHT: 3px">In de nieuwsbrief deze week: </p>
                                    <
ul>
                                        <
li><strong>Dit is een titel</strong> </li>
                                        <
li><strong>Dit is een titel</strong> </li>
                                        <
li><strong>Dit is een titel</strong> </li>
                                        <
li><strong>Dit is een titel</strong> </li>
                                    </
ul>
                                    <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; MARGIN-RIGHT: 3px"><font face="arial" color="#213073" size="2"><strong>Hier in titel</strong></font><br /><font face="arial" color="#000000" size="2">Lorem ipsum dolor sit ametconsectetuer adipiscing elitFusce laoreet rutrum elitNunc arcu loremaliquet nonlacinia insodales vitaeloremDonec ut ante et odio aliquet consequatIn massa nisltincidunt idvehicula inaliquam idnislCurabitur imperdietrisus dignissim tincidunt eleifendmagna mi iaculis tortoret lacinia urna felis et enimNulla feugiat tempus lacusSed liberoPellentesque congueMauris vitae tortorCurabitur eu lacusMorbi eros anteimperdiet eucongue utgravida idanteCurabitur leo loremtincidunt quisiaculis vitaedapibus sit </font></p>
                                    <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; MARGIN-RIGHT: 3px"><font face="arial" color="#213073" size="2"><strong>Hier in titel</strong></font><br /><font face="arial" color="#000000" size="2">Lorem ipsum dolor sit ametconsectetuer adipiscing elitFusce laoreet rutrum elitNunc arcu loremaliquet nonlacinia insodales vitaeloremDonec ut ante et odio aliquet consequatIn massa nisltincidunt idvehicula inaliquam idnislCurabitur imperdietrisus dignissim tincidunt eleifendmagna mi iaculis tortoret lacinia urna felis et enimNulla feugiat tempus lacusSed liberoPellentesque congueMauris vitae tortorCurabitur eu lacusMorbi eros anteimperdiet eucongue utgravida idanteCurabitur leo loremtincidunt quisiaculis vitaedapibus sit </font></p>
                                    </
td>
                                </
tr>
                            </
tbody>
                        </
table>
                        </
td>
                    </
tr>
                </
tbody>
            </
table>
            <
table height="125" cellspacing="0" cellpadding="0" width="80%" align="center" bgcolor="#42519c">
                <
tbody>
                    <
tr>
                        <
td>
                        <
p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; LINE-HEIGHT: 150%; MARGIN-RIGHT: 3px" align="center"><a href="http://www.beurstip.com/nieuw/privacy.php"><font face="arial" color="#ffffff" size="2">Privacy Policy | <a href="http://www.beurstip.com/nieuw/"><font face="arial" color="#ffffff" size="2">Disclaimer<br /><font face="arial" color="#ffffff" size="1">Copyright Beurstip.com &copy2006 </font></font></a></font></a> | </p>
                        </
td>
                    </
tr>
                </
tbody>
            </
table>
            </
td>
        </
tr>
    </
tbody>
</
table
NOTE: I'm using FCKtemplates which is an XML package. This is the complete XML packed code:

PHP Code:

<?xml version="1.0" encoding="utf-8" ?>

<Templates imagesBasePath="fck_template/images/">
    <Template title="Nieuwsbrief" image="template1.gif">
        <Description>Beurstip Nieuwsbrief (betalend)</Description>
        <Html>
            <![CDATA[
<table width="100%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>

<table height="25px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
<font size="3" color=white face=arial>GRATIS Nieuwsbrief van Beurstip.com</font>
</td></tr>
</table>
<table height="125px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
<img src=http://www.beurstip.com/nieuw/img/logo.jpg>
</td></tr>
</table>

<table width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td width="20%">
Hier komt de linkertekst
</td><td width="80%">

<table width="100%" cellspacing="0" cellpadding="0">
<tr><td>
In de nieuwsbrief deze week:
<ul>
<li>Een</li>
</ul>
</td></tr>
</table>

</tr>
</table>


<table height="125px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
FOOTER
</td></tr>
</table>



</td></tr>
</table>

            ]]>
        </Html>
    </Template>
    <Template title="Nieuwsbrief gratis" image="template2.gif">
        <Description>De gratis nieuwsbrief</Description>
        <Html>
            <![CDATA[
<table width="100%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>

<table height="25px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
<font size="3" color=white face=arial>GRATIS Nieuwsbrief van Beurstip.com</font>
</td></tr>
</table>
<table height="125px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
<img src=http://www.beurstip.com/nieuw/img/logo.jpg>
</td></tr>
</table>

<table width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td width="20%">
Hier komt de linkertekst
</td><td width="80%">

<table width="100%" cellspacing="0" cellpadding="0">
<tr><td>
In de nieuwsbrief deze week:
<ul>
<li>Een</li>
</ul>
</td></tr>
</table>

</tr>
</table>


<table height="125px" width="80%" bgcolor="#F3f3f3" cellspacing="0" cellpadding="0">
<tr><td>
FOOTER
</td></tr>
</table>



</td></tr>
</table>

            ]]>
        </Html>
    </Template>
</Templates>
Reply With Quote
  #4 (permalink)  
Old 11-03-06, 06:35 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you had some errors in your html. replace the following lines:
Code:
<p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; LINE-HEIGHT: 150%; MARGIN-RIGHT: 3px" align="center"><a href="http://www.beurstip.com/nieuw/privacy.php"><font face="arial" color="#ffffff" size="2">Privacy Policy | <a href="http://www.beurstip.com/nieuw/"><font face="arial" color="#ffffff" size="2">Disclaimer<br /><font face="arial" color="#ffffff" size="1">Copyright Beurstip.com &copy; 2006 </font></font></a></font></a> | </p>
by:
Code:
<p style="MARGIN-TOP: 3px; MARGIN-LEFT: 3px; LINE-HEIGHT: 150%; MARGIN-RIGHT: 3px" align="center"><a href="http://www.beurstip.com/nieuw/privacy.php"> <font face="arial" color="#ffffff" size="2">Privacy Policy </font></a> | <a href="http://www.beurstip.com/nieuw/"><font face="arial" color="#ffffff" size="2">Disclaimer<br />Copyright Beurstip.com &copy; 2006 </font></font></a> | </p>
Quote:
Originally Posted by gigafare
So instead of img/name.jpg linking to www.domain/img/name.jpg ?
yes, this should do it. but as i said in my previous post: when the user is offline, he wont see the image.

I'm not sure if this is gonna solver your problem, but give it a try;
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Play free flash games online iBold General Advertisements 4 01-15-06 01:59 PM


All times are GMT -5. The time now is 05:44 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.