L'incorporation d'images d'arrière-plan dans un e-mail

Je suis en train d'utiliser une image incorporée dans un e-mail comme l'image de fond, j'ai le code suivant pour l'intégrer:

        LinkedResource backgroundLink = new LinkedResource("..\\..\\background.gif");
        backgroundLink.ContentId = "BackgroundImage";
        backgroundLink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
        htmlView.LinkedResources.Add(backgroundLink);
        m.AlternateViews.Add(htmlView);

Ensuite dans le corps de l'email que j'ai le code suivant pour tester:

        <table background='cid:BackgroundImage'>
            <tr>
               <td>
                  test
               </td>
            </tr>
        </table>

Il ne s'affiche pas, mais quand je l'ai mis dans comme une image, comme c'est beau:

         <table>
            <tr>
               <td>
                  <img src='cid:BackgroundImage' />
               </td>
            </tr>
        </table>

Quelqu'un sait pourquoi il n'affiche pas comme arrière-plan?

Merci beaucoup d'avance 🙂

InformationsquelleAutor Chris | 2009-11-20