IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

[Mail] Absence de background


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    54
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 54
    Par défaut [Mail] Absence de background
    Bonjour à tous !
    J'utilise la fonction mail de PHP mais je n'arrive pas à afficher des backgrounds de cellules de mon tableau HTML intégré dans le mail.
    Voila mon code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    <?
    ## Test envoie Email ##
    $destinataire = "XXX@gmail.com";
    $sujet = "Message TEST HTML";
    $expediteur = "XX@YYY.com";
    $from  = "From:$expediteur\n";
    $from .= "MIME-version: 1.0\nContent-type: text/html; charset= iso-8859-1\n";
     
    $message = "
    <table cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"600\" align=\"center\">
        <tr>
            <td width=\"600\" style=\"border-width:0; border-color:rgb(241,243,248); border-style:none;\" background=\"URL DE MON IMAGE\" height=\"96\"></td>
        </tr>
        <tr>
            <td width=\"600\" style=\"border-width:0; border-color:rgb(241,243,248); border-style:none;\" background=\"URL DE MON IMAGE 2\" height=\"81\">
                <table cellspacing=\"0\" style=\"border-collapse:collapse;\" width=\"594\">
                    <tr>
                        <td width=\"14\" style=\"border-top-width:1; border-right-width:0; border-bottom-width:0; border-left-width:0; border-top-color:white; border-right-color:rgb(241,243,248); border-bottom-color:rgb(241,243,248); border-left-color:rgb(241,243,248); border-top-style:solid; border-right-style:none; border-bottom-style:none; border-left-style:none;\"><font size=\"2\" face=\"Arial\">&nbsp;</font></td>
                        <td width=\"568\" style=\"border-top-width:1; border-right-width:0; border-bottom-width:0; border-left-width:0; border-top-color:white; border-right-color:rgb(241,243,248); border-bottom-color:rgb(241,243,248); border-left-color:rgb(241,243,248); border-top-style:solid; border-right-style:none; border-bottom-style:none; border-left-style:none;\">BlaBlabla .... 
                        </td>
                        <td width=\"6\" style=\"border-top-width:1; border-right-width:0; border-bottom-width:0; border-left-width:0; border-top-color:white; border-right-color:rgb(241,243,248); border-bottom-color:rgb(241,243,248); border-left-color:rgb(241,243,248); border-top-style:solid; border-right-style:none; border-bottom-style:none; border-left-style:none;\"></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width=\"600\" style=\"border-width:0; border-color:rgb(241,243,248); border-style:none;\" background=\"URL DE MON IMAGE 3\">&nbsp;</td>
        </tr>
    </table>";
     
    mail($destinataire,$sujet,$message,$from);
     
    ?>
    L'envoie s'effectue sans problème, le texte apparait sans problème, il y a juste ce problème d'affichage de background sachant que les images ne proviennent pas du message (pas en pièce jointe) mais depuis un site distant.

    Si quelqu'un peut m'aider, merci d'avance !
    Bonne journée !

    DJPi

  2. #2
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Octobre 2004
    Messages
    185
    Détails du profil
    Informations personnelles :
    Âge : 35
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Octobre 2004
    Messages : 185
    Par défaut
    L'url est bien de type : http://site.domaine/images/images.jpg ?

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    54
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 54
    Par défaut
    Oui,
    Je vais vérifier si ce n'est pas Outlook qui bloque le HTML ca se pourrait ...

  4. #4
    Membre averti
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    54
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 54
    Par défaut
    J'ai résolu mon problème.
    Outlook bloque les "background" de mes tableaux ...
    Comme cela se passe uniquement sur Outlook, mon problème est résolu.

    Merci quand même à Mathelec !
    A bientôt !

    DJPi

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [HTML 4.0] Absence de background dans page issue d'un modèle
    Par maeva7283 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 01/10/2009, 08h44
  2. background image dans mail
    Par kanabzh29 dans le forum Mise en page CSS
    Réponses: 5
    Dernier message: 09/12/2008, 13h59
  3. [Mail] mail html problème de background
    Par luta dans le forum Langage
    Réponses: 1
    Dernier message: 29/12/2007, 19h44
  4. [MRTG] Absence de surveillance des fils d'attente Mail
    Par Albinpopote dans le forum Administration système
    Réponses: 2
    Dernier message: 02/09/2007, 14h34
  5. background-image dans un mail
    Par lau_the_raptor dans le forum Mise en page CSS
    Réponses: 5
    Dernier message: 06/11/2006, 00h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo