{"id":3359,"date":"2018-09-03T10:59:32","date_gmt":"2018-09-03T08:59:32","guid":{"rendered":"https:\/\/assistance.groupemagiconline.com\/?post_type=ht_kb&#038;p=3359"},"modified":"2022-09-26T10:47:57","modified_gmt":"2022-09-26T08:47:57","slug":"fonction-mail-de-php","status":"publish","type":"ht_kb","link":"https:\/\/assistance.groupemagiconline.com\/en\/knowledge-base\/fonction-mail-de-php\/","title":{"rendered":"PHP mail function"},"content":{"rendered":"<div class=\"level2\">\n<p style=\"text-align: justify;\">The mail function of PHP <code>mail()<\/code> can be used freely, within the framework of the respect of the law and our <a href=\"https:\/\/www.magic.fr\/cgv-conditions-generales-et-particulieres-de-vente\/\" target=\"_blank\" rel=\"noopener\">GTC<\/a>.<\/p>\n<p style=\"text-align: justify;\"><strong>We do not impose a limit on the number of emails sent in a given period<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><strong>However, we limit the speed at which they are sent.<\/strong><\/p>\n<p style=\"text-align: justify;\">Thus, it is possible to send 20, 2000 or 20000 e-mails, with the mail function of PHP, without risk of being blocked. However, they will be transmitted at a rate of about 600 e-mails per hour.<\/p>\n<p style=\"text-align: justify;\"><em class=\"u\">    \t\t<div class=\"hts-messages hts-messages--info\"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tWe reserve the right to immediately suspend any site linked to an abusive email.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t<\/em><\/p>\n<\/div>\n<div class=\"level2\" style=\"text-align: justify;\">\n<h2 class=\"sectionedit3\">Advice and optimization<\/h2>\n<h3><em><strong>Sender<\/strong><\/em><\/h3>\n<p><strong>First of all, the \"From\" must correspond to the domain name of the web site from which the e-mail is sent. The same goes for the associated headers such as envelope-from, reply-to, etc.<\/strong><\/p>\n<p>If the From of the sent email does not match the domain name associated with a Nuxit service, you may have a delivery problem. That said, the verification systems always refer to SPF, DKIM and DMARC.<\/p>\n<p>In conclusion, <strong>what not to do<\/strong> :<\/p>\n<ul>\n<li>Use an email address entered by a visitor as a sender for a message sent via your website.<\/li>\n<li>Use the e-mail address of another provider, such as Gmail.com, Orange.fr or Hotmail.fr as the sender.<\/li>\n<\/ul>\n<h3><em><strong>Content<\/strong><\/em><\/h3>\n<ul>\n<li>Avoid using too much<strong>images<\/strong> in your email. If possible, try to combine several small images into one larger image. The image\/text ratio must be balanced. An email composed exclusively of images has every chance of being considered as <a href=\"https:\/\/assistance.groupemagiconline.com\/en\/knowledge-base\/abus-spam\/\" target=\"_blank\" rel=\"noopener\">spam<\/a>. So remember to accompany your images with <strong>sufficient text<\/strong>. In general, put graphics, photos, logos... in short everything that is not textual. Type in real HTML text for the textual part. Last but not least, do not embed your images directly in the message. Instead, make links to images hosted on the web. This allows you to cross the anti-spam barriers, lighten the weight of your message, and at the same time increase the sending speed!<\/li>\n<li><strong>Ban<\/strong>\u00a0Obviously, words or expressions with a double meaning that could have a sexual or \"medicinal\" connotation. Also avoid words like \"Free\", \"Promotion\", \"Promo\", \"Discount\", \"Offer\", \"Sale\", \"Gift\"... or certain characters, such as the exclamation mark or the question mark in the subject of the message. To find out which characters to avoid, you can visit the Microsoft site for Outlook. More subtly, avoid putting your hyperlinks behind terms such as \"Click here\".<\/li>\n<li>The use of certain terms is not the only clue on which spam filters base their rejection of an e-mail. They also take into account the\u00a0<strong>format<\/strong>as the\u00a0<strong>font size<\/strong>\u00a0or its\u00a0<strong>color<\/strong>. Thus, avoid writing the entire message in a font equal to or larger than 16. Also, red and green should be avoided.<\/li>\n<li><strong>Avoid<\/strong>\u00a0as much as possible the files in\u00a0<strong>attachments<\/strong>. Especially if they are PDF files and your message contains little text. Instead, put your files on a web server and put download links in your email. By doing this, you reduce the weight of the message and therefore increase the speed of sending.<\/li>\n<li>Even if you want to send your message in HTML format,\u00a0<strong>also fill in<\/strong>\u00a0the message part\u00a0<strong>Text<\/strong>. You will get a double benefit: on the one hand, recipients who cannot read HTML (it still exists!) will still be able to read your email. On the other hand, anti-spam filters are generally less strict with messages in double format.<\/li>\n<li>Don't put your URLs as IP addresses, and avoid URLs containing percentages and dollars. Don't put a tracked link behind a URL either. Instead, put something like \"visit our site\", or put your URL as an image.<\/li>\n<\/ul>\n<\/div>\n<h3 class=\"sectionedit3\" style=\"text-align: justify;\">Bulk sending<\/h3>\n<ul>\n<li class=\"level1\" style=\"text-align: justify;\">\n<div class=\"li\">Each e-mail sent must mention <strong>a clear and functional unsubscribe link<\/strong>.<\/div>\n<\/li>\n<li class=\"level1\">\n<div class=\"li\" style=\"text-align: justify;\">You must not <strong>send e-mails<\/strong> that to persons who have intentionally <strong>requested<\/strong> the reception of your messages.<\/div>\n<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>The mail function of PHP mail() can be used freely, within the framework of the respect of the law and of our T&amp;C. We do not impose any limit on the number of mails sent in a given period. However, we do limit the speed at which they are sent. Thus, it is possible to send 20,...<\/p>","protected":false},"author":52,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[734,25,733],"ht-kb-tag":[669],"class_list":["post-3359","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-mutualise-standard","ht_kb_category-messageries-pop-imap","ht_kb_category-performance","ht_kb_tag-site-web"],"_links":{"self":[{"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb\/3359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/comments?post=3359"}],"version-history":[{"count":3,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb\/3359\/revisions"}],"predecessor-version":[{"id":10831,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb\/3359\/revisions\/10831"}],"wp:attachment":[{"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/media?parent=3359"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=3359"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/assistance.groupemagiconline.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=3359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}