<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.code-web.org/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Code-Web.org - ressources</title>
  <link>http://www.code-web.org/</link>
  <description>Développement Web en toute liberté!</description>
  <language>fr</language>
  <pubDate>Mon, 08 Sep 2008 10:48:53 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Gratos.be</title>
    <link>http://www.code-web.org/post/2008/03/09/36-gratosbe</link>
    <guid isPermaLink="false">urn:md5:38a40e40cecf5675f9eb3f54ca08b8a5</guid>
    <pubDate>Sun, 09 Mar 2008 15:58:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Ressources</category>
        <category>kit graphique</category><category>ressources</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.gratos.be/&quot; hreflang=&quot;fr&quot;&gt;Gratos.be&lt;/a&gt;, dans sa &lt;a href=&quot;http://www.gratos.be/webmaster/&quot; hreflang=&quot;fr&quot;&gt;rubrique webmaster&lt;/a&gt;, vous propose des ressources graphiques dont des kit graphiques complet. Vous y trouverez également quelque informations sur le HTML et les CSS. Enfin, ce site propose un annuaire de sites proposant des services dédiés au webmaster assez conséquent.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/03/09/36-gratosbe#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/03/09/36-gratosbe#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/21</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=21">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Trouver les bonnes couleurs</title>
    <link>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs</link>
    <guid isPermaLink="false">urn:md5:89270f39d868e6a2e4b3d57678f805e4</guid>
    <pubDate>Mon, 04 Feb 2008 13:46:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Web Design</category>
        <category>design</category><category>kit graphique</category><category>ressources</category>    
    <description>    &lt;p&gt;L'une des étapes de la production d'une charte graphique, et non des moindres, est le choix des couleurs qui seront utilisés. Une première couleur pourra assez facilement être déterminée en fonction du thème abordé ou selon les goûts et les couleurs du designer. Cependant, il n'est pas toujours aisé de trouver les couleur qui se marieront bien avec la première.&lt;/p&gt;


&lt;p&gt;Heureusement, il existe sur la toile des outils destinés à faciliter cette tâche. Parmi les meilleurs, on citera &lt;a href=&quot;http://www.colormatch.dk/&quot; hreflang=&quot;en&quot;&gt;colormatch.dk&lt;/a&gt; mais il existe d'autres. Une recherche sur le web vous en donnera la liste. A noter que ce genre d'outils n'est pas exclusivement destiné au Web Design, il pourrait très bien être employé pour le choix des couleurs de votre future salon par exemple.&lt;/p&gt;


&lt;p&gt;A propos des couleurs, citons un dernier site, &lt;a href=&quot;http://www.pourpre.com/&quot; hreflang=&quot;fr&quot;&gt;pourpre.com&lt;/a&gt; où vous pourrez trouver bon nombre d'informations à propos des couleurs et notamment de bons moyens pour calibrer correctement votre écran.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/30</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=30">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Webdiz.com</title>
    <link>http://www.code-web.org/post/2008/01/14/37-webdizcom</link>
    <guid isPermaLink="false">urn:md5:74f3ac514a73f195c1bca5dfe973d841</guid>
    <pubDate>Mon, 14 Jan 2008 17:42:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Ressources</category>
        <category>ressources</category><category>service</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.webdiz.com/&quot; hreflang=&quot;fr&quot;&gt;Webdiz.com&lt;/a&gt; propose des services pour webmaster tel que des compteurs de visiteurs, des compteurs &lt;em&gt;live&lt;/em&gt;, module de news, shootbox, livre d'or, etc.&lt;/p&gt;


&lt;p&gt;Si vous n'êtes pas familier avec la programmation côté serveur, ce site pourra vous rendre service.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/01/14/37-webdizcom#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/01/14/37-webdizcom#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/22</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=22">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Les favicon : Favicon.fr</title>
    <link>http://www.code-web.org/post/2008/01/09/34-les-favicon-faviconfr</link>
    <guid isPermaLink="false">urn:md5:12ef4ae0f886107f459b8191b5664cce</guid>
    <pubDate>Wed, 09 Jan 2008 11:11:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Ressources</category>
        <category>favicon</category><category>ressources</category><category>service</category>    
    <description>    &lt;p&gt;Connaissez-vous les favicon? Ce nom provient de la contraction deux termes&amp;nbsp;: favorite (en anglais &lt;em&gt;favori&lt;/em&gt;) et icon (en anglais &lt;em&gt;icône&lt;/em&gt;). Il s'agit de l'icône qui sera affichée à côté du nom de votre site dans les favoris d'un visiteur. Cette icône pourra également être affichée dans certain navigateurs dans les onglet de navigation. C'est le cas de Firefox par exemple.&lt;/p&gt;


&lt;p&gt;L'installation des favicon est très simple, il suffit de placer un fichier favicon.ico à la racine de votre site web.&lt;/p&gt;


&lt;p&gt;Le site &lt;a href=&quot;http://www.favicon.fr/&quot; hreflang=&quot;fr&quot;&gt;Favicon.fr&lt;/a&gt; propose tout un assortiment de favicon et quelques informations supplémentaires, notamment sur la procédure d'installation de ces deniers sur votre site.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/01/09/34-les-favicon-faviconfr#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/01/09/34-les-favicon-faviconfr#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/19</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=19">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Freemages.fr</title>
    <link>http://www.code-web.org/post/2007/12/31/33-freemagesfr</link>
    <guid isPermaLink="false">urn:md5:f9f35295c15138cc75a2d14bb2b6818d</guid>
    <pubDate>Mon, 31 Dec 2007 15:10:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Ressources</category>
        <category>ressources</category>    
    <description>    &lt;p&gt;Le site &lt;a href=&quot;http://www.freemages.fr/&quot; hreflang=&quot;fr&quot;&gt;Freemages.fr&lt;/a&gt; propose tout un tas de photos de paysages, lieux, monuments, etc. Sous &lt;a href=&quot;http://www.freemages.fr/help/licence_art_libre.php&quot; hreflang=&quot;fr&quot;&gt;licence Art Libre&lt;/a&gt;. De quoi vous aider dans la réalisation de chartes graphiques pour vos sites mais aussi pour illustrer le contenu.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/12/31/33-freemagesfr#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/12/31/33-freemagesfr#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/18</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=18">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>L'envoit d'e-mail avec PHP c'est simple comme PHPMailer</title>
    <link>http://www.code-web.org/post/2007/11/20/27-l-envoit-d-e-mail-avec-php-c-est-simple-comme-phpmailer</link>
    <guid isPermaLink="false">urn:md5:0913f16906b73e097a051c3b566f517b</guid>
    <pubDate>Tue, 20 Nov 2007 13:15:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>PHP</category>
        <category>automatisation</category><category>messagerie</category><category>php</category><category>ressources</category>    
    <description>&lt;p&gt;Voyant beaucoup de personnes rencontrer des problèmes pour l'envoi d'e-mail en PHP, je vous propose dans cet article de découvrir la classe PHPMailler rendant la tâche beaucoup plus simple. Bien sur, envoyer un simple e-mail au format texte n'a rien de compliqué. Toutefois, lorsqu'il s'agit de l'envoyer au format HTML, ou encore d'y joindre un fichier, certains si perdent. PHPMailer apporte une solution simple et efficace.&lt;/p&gt;    &lt;h3&gt;Pour commencer&lt;/h3&gt;

&lt;p&gt;Avant toute chose, vous allez devoir &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=26031&quot; hreflang=&quot;fr&quot;&gt;télécharger PHPMailer&lt;/a&gt;. Une fois l'archive décompressée, vous trouverez plusieurs fichiers dont class.phpmailer.php. C'est celui-ci qui nous intéressera. Il contient toute la définition de la classe PHPMailer. Tout code faisant appel à cette classe devra donc commencer par les instructions suivantes&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
   &lt;span style=&quot;color: #b1b100;&quot;&gt;require&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'class.phpmailer.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;h3&gt;Un premier mail&lt;/h3&gt;

&lt;p&gt;Nous allons tenter d'envoyer un premier e-mail grâce à cette classe. Vous allez tout de suite comprendre à quel point il est simple de l'utiliser.&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On va chercher la définition de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #b1b100;&quot;&gt;require&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'class.phpmailer.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On créé une nouvelle instance de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPMailer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// De qui vient le message, e-mail puis nom&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;From&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;moi@vous.la&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;FromName&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Nom Prénom&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Définition du sujet/objet&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;Subject&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Un mail envoyé avec PHPMailer!&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On définit le corps du message&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;Body&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Bonjour!&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Il reste encore à ajouter au moins un destinataire&lt;/span&gt;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// (ou plus, par plusieurs appel à cette méthode)&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;AddAddress&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;hey@ho.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;HeyHo&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Pour finir, on envoi l'e-mail&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Dans cette exemple, nous avons envoyé un message simple en format texte. Comme vous pouvez le voir, l'envoi est tout de suite plus clair. Il n'est pas nécessaire de créer les entêtes du message. De plus, les noms d'attributs et méthodes sont très clairs.&lt;/p&gt;


&lt;h3&gt;Un mail au format HTML&lt;/h3&gt;

&lt;p&gt;On va maintenant voir à quel point cette classe est intéressante. Avec un exemple d'envoi d'e-mail au format HTML. Là encore, rien de bien compliqué, et c'est justement tout l'intérêt de cette classe!&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On va chercher la définition de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #b1b100;&quot;&gt;require&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'class.phpmailer.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On créé une nouvelle instance de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPMailer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// De qui vient le message, e-mail puis nom&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;From&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;moi@vous.la&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;FromName&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Nom Prénom&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Définition du sujet/objet&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;Subject&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Un mail envoyé avec PHPMailer!&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On lit le contenu d'une page html&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$body&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;file_get_contents&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'page_mail.html'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On définit le contenu de cette page comme message&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;MsgHTML&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;$body&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On pourra définir un message alternatif pour les boîtes de&lt;/span&gt;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// messagerie n'acceptant pas le html&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;AltBody&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Ce message est au format HTML, votre messagerie n'accepte pas ce format.&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Il reste encore à ajouter au moins un destinataire&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;AddAddress&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;hey@ho.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;HeyHo&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Pour finir, on envoi l'e-mail&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Notez qu'on ne se pose toujours pas la question de la formation des entêtes. On pourra tout de même se poser la question du jeu de caractères (charset). Par défaut, il est définit à ISO-8859-1. Mais il est tout à fait possible de le changer avec l'instruction suivante&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Pour le passer en UTF-8 par exemple :&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;CharSet&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'UTF-8'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;h3&gt;Un mail avec pièce jointe&lt;/h3&gt;

&lt;p&gt;Voilà une question très fréquente dans les forums de programmation PHP, comment envoyer un e-mail avec une pièce jointe? PHPMailer propose là encore une solution simple et efficace. Imaginons que l'on souhaite envoyer notre CV par e-mail&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;php&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;?php&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On va chercher la définition de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #b1b100;&quot;&gt;require&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'class.phpmailer.php'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On créé une nouvelle instance de la classe&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; PHPMailer&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// De qui vient le message, e-mail puis nom&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;From&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;moi@vous.la&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;FromName&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Nom Prénom&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Définition du sujet/objet&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;Subject&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Un mail envoyé avec PHPMailer!&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On définit le corps du message&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;Body&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Bonjour!
Veuillez trouver ci-joint mon CV.
&amp;nbsp;
Cordialement,
Machin truc.&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Il reste encore à ajouter au moins un destinataire&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;AddAddress&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;recrutement@ho.com&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;HeyHo&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// On met notre CV en pièce jointe&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;AddAttachment&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'./CV.pdf'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;// Pour finir, on envoi l'e-mail&lt;/span&gt;
   &lt;span style=&quot;color: #ff0000&quot;&gt;$mail&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #006600;&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Vous remarquerez encore une fois que l'envoi de pièce jointe est considérablement simplifié en utilisant PHPMailer.&lt;/p&gt;


&lt;h3&gt;Le mot de la fin&lt;/h3&gt;

&lt;p&gt;Pour aller plus loin, rien de mieux que de vous rendre sur le &lt;a href=&quot;http://phpmailer.codeworxtech.com/&quot; hreflang=&quot;en&quot;&gt;site officiel de PHPMailer&lt;/a&gt;, en anglais. Vous y trouverez une documentation très complète sur l'utilisation de cette classe et les différentes possibilités qui vous sont offertes.&lt;/p&gt;


&lt;p&gt;Ce qui est certain, c'est qu'il ne faut pas se priver de l'utiliser. Vous gagnerez du temps dans vos développements.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/11/20/27-l-envoit-d-e-mail-avec-php-c-est-simple-comme-phpmailer#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/11/20/27-l-envoit-d-e-mail-avec-php-c-est-simple-comme-phpmailer#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/12</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=12">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
</channel>
</rss>