Attachement and custom headers
-
Hi,
My website contains a plugin to book an appointment, then when the appointment is booked, I use your plugin to send a confirmation email with a calendar event (.ics) attachment.
If I send the email with the default PHP mail() function, everything works fine.
When I use wp_mail() instead, the email is broken (missing header, no attachment):Working email sent with PHP mail() function:
Delivered-To: [email protected] Received: by 10.176.89.234 with SMTP id k39csp1281997uad; Thu, 9 Nov 2017 17:18:04 -0800 (PST) X-Google-Smtp-Source: ABhQp+RgBlqbBPtlaCcF8ooW1WSzJrTlntZES0f1gHjSlLcYENJhgmlgmsISYew0nA4TiWO6O/OT X-Received: by 10.223.157.137 with SMTP id p9mr1120423wre.92.1510276683998; Thu, 09 Nov 2017 17:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510276683; cv=none; d=google.com; s=arc-20160816; b=Q285kylTJgR3Zb49rLxA/mAhAHtQjPlGnEgbjFsVbMob8Ar5HFXiCN4LRmfV+GQof2 TX6nOz4OTg7PlBOa5f1sqgDltCqpuXoH1qYzaVn1TI4DuRb4jJbN1/iuDyfrTnNbY+U5 W1RvHmEoArTrfeF/GXrl73NkHegRccP1ahWAHT9XPD2FmPBCXn/746ELlOBNFlTzq4w5 KmhpHirzwkqshK393XGCI6e8PRr4w9fTVITA2yl1kz3TTOAZujkT6onISmnXhUT0ILQE anfpVO+kNm9xZ1NMz4zhPrfAvwGzcG4VKwQvFarpyMRhDvW7rzRpGqRBzXAwvJYhC9+h oHWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:content-class:mime-version :message-id:reply-to:from:date:subject:to:arc-authentication-results; bh=clkv+x3SIYp1f51FiiEbHPKRnhL1kyvpuMAv137JR9Q=; b=Z3weCh1iNDu6zS4FS0bOzXArTJcWvggXGZjsCbheeeAKmyfIXSvd7SBVux6vYkPczd eKWVKZjvh7J4LIt5lr5TH2rYdipPjMsIJC7LzvYXG1B7xT4VC3m+fbzRmg8W3AGNzDIQ qqriE9uk6G7AkRwEp7ajbWL1U0bG2Wp35awn7hLe4BBxVxteAQiTfaou/c7jhePegTM0 kMgBJkrxrXpMc2bXgt/7lvY3nt7ivN/yhy0bcFUZuipeoPbw8DJfC/oBJizdpQcTHhZN Scz9vMithNeEf+mAcx6Mi75sUw6bNrBaTALFsaVpgUDxlYaAP2fd/pCPcGzFlVcdkZfW 1IJw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning [email protected] does not designate 91.134.133.165 as permitted sender) [email protected]; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: <[email protected]> Received: from vps296330.ovh.net.example.com (165.ip-91-134-133.eu. [91.134.133.165]) by mx.google.com with ESMTP id u2si7810023wra.454.2017.11.09.17.18.03 for <[email protected]>; Thu, 09 Nov 2017 17:18:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning [email protected] does not designate 91.134.133.165 as permitted sender) client-ip=91.134.133.165; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning [email protected] does not designate 91.134.133.165 as permitted sender) [email protected]; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: by vps296330.ovh.net (Postfix, from userid 1001) id B822440E34; Fri, 10 Nov 2017 02:18:03 +0100 (CET) To: [email protected] Subject: Appointment Date: Fri, 10 Nov 2017 02:18:03 +0100 From: Pro <[email protected]> Reply-To: Pro <[email protected]> Message-ID: <[email protected]> X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer) MIME-Version: 1.0 Content-class: urn:content-classes:calendarmessage Content-Type: multipart/alternative; boundary="----Meeting Booking----308baa68c95ec0925bb56a57c199d30c" MIME-Version: 1.0 Content-Type: multipart/alternative; charset= Content-Transfer-Encoding: 8bit ------Meeting Booking----308baa68c95ec0925bb56a57c199d30c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <html> <body> <p>Appointment details</p></body> </html> ------Meeting Booking----308baa68c95ec0925bb56a57c199d30c Content-Type: text/calendar;name="rdv.ics";method=REQUEST Content-Transfer-Encoding: 8bit BEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT ORGANIZER;CN="Pro":MAILTO:[email protected] ATTENDEE;CN="":MAILTO:[email protected] UID:[email protected] DTSTAMP;TZID="Europe/Paris":20171110T21803 DTSTART;TZID="Europe/Paris":20171130T170000 DTEND;TZID="Europe/Paris":20171130T173000 TRANSP:OPAQUE SEQUENCE:1 SUMMARY:MyAppointment LOCATION:MyLocation CLASS:PUBLIC PRIORITY:5 BEGIN:VALARM TRIGGER:-PT15M ACTION:DISPLAY DESCRIPTION:Reminder END:VALARM END:VEVENT END:VCALENDAR ------Meeting Booking----308baa68c95ec0925bb56a57c199d30c--Non working email sent with PHP wp_mail() function:
Delivered-To: [email protected] Received: by 10.176.89.234 with SMTP id k39csp1271355uad; Thu, 9 Nov 2017 17:06:00 -0800 (PST) X-Received: by 10.223.157.40 with SMTP id k40mr1745798wre.153.1510275960685; Thu, 09 Nov 2017 17:06:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510275960; cv=none; d=google.com; s=arc-20160816; b=R3SSZYiuNFy+stYB+tKBqY4MUcMDaDo9AYGMDBGiFj/os2BcA+Rwe6CeWYYW3ccyEx HgoC2IObnQAZ1n84/WYtmKzHw793udysFxRXsD4uTl5ilSctdVjibLFcnPcf8i8o4mpJ gniWzErmgZpRuGfXk7Mkm/RRrBfcw/o4MzwsS3Zj+nUkuKbRoXkcnFQNSJOMyy1oMbkV My4WNhMJtNEsZTx1YbxS46a1MVfezq5cxKRd3mv6zqmJQm9uBeQCzBITOlEr4Q25PKZ/ 9fy+KTcOaLVFFxlBJZ7wEoiAIOz7AlYwcUOOQCYnxAk1eg990RBdaNdur8LgXNHf6Qke jz7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:content-transfer-encoding:date:subject:reply-to :to:from:content-class:mime-version:message-id:dkim-signature :arc-authentication-results; bh=XP1RVTF4gdedwlK88E8ptyA2+qRazNxfFm7Qcz8Abfo=; b=ZZQb0TO1KpTIokZa9rJGxqcj5o++VPxkZYSdKcdOP3v6A+qV1EiVXdIff+ZqQhGhek jHFtTJ3uqyP8SeR6Lt8HNbYe8oYJlk/JRFrpLlxWJuv6Nb4NL6umCG8r7KGb2vUhNR55 Cp90oQi3j5jN11vLc28X+wXNQcSuvqHNvF+d0qnMo9ZOHrQFu9ooHTwiA3lqog8eVc+A X0keGx0NcP8dK0vp5vD/Ygl9wTv/HM3LUMUm65lrwV7Tz2UKm1z9bZpmVUYs8/Yi0zUq k5PyHpY/BsyDZVDJv6YnLrFuvgTeNhRzBEQUQkTUJtZf1quMTi/XiDAqJyR/R8y6DkPg LNKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass [email protected] header.s=20161025 header.b=agGM4NRr; spf=pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) [email protected]; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: <[email protected]> Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 19sor3268123wrz.54.2017.11.09.17.06.00 for <[email protected]> (Google Transport Security); Thu, 09 Nov 2017 17:06:00 -0800 (PST) Received-SPF: pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass [email protected] header.s=20161025 header.b=agGM4NRr; spf=pass (google.com: domain of [email protected] designates 209.85.220.41 as permitted sender) [email protected]; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:mime-version:content-class:from:to:reply-to:subject:date :content-transfer-encoding:content-disposition; bh=XP1RVTF4gdedwlK88E8ptyA2+qRazNxfFm7Qcz8Abfo=; b=agGM4NRrstTEWx2wk27nRYOHA3DXf0rFOGM6uG6hpoORaceKbQeiKdfTkZjW3GAqpo d7AoUzqXr3TQobNwaY2xtxMUUba69N7K0LQY5QVW+1EaRfLerfh0L9errBPWrhZnOhfH d/WQLa+QaLjMPQDx1UTl4yorGoYQdfcqDyXjI6qRCqfaPNiC6z1z1ZkW7QWyNXvTB/hp YqwVOKtBn+AdWQhMSJaWZzub3RC0tbz7bMF1EixKxpFUzrhWTp3tL4M1v+B847Z9mnaJ CdcaVBiUJKppYtMhi3A6PEMVu6QuexWSD53ZebWCof0kwC6+R9Px7yoh1HfN71dDPUHY WlGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:mime-version:content-class:from:to :reply-to:subject:date:content-transfer-encoding:content-disposition; bh=XP1RVTF4gdedwlK88E8ptyA2+qRazNxfFm7Qcz8Abfo=; b=oSse+236tEDPGVjluFd7DWk4AfmS/xGTYs19AizhW8mk6l5cvtyDInSY8fymbe8FFB qbxRk4tfxWbj0DVaQINHM394WyUDgAZnoXCVi/la1NXGMTWVlt4cmYnFoPDY2XMj81Mx MnJPzLkR99l3psADTbOGcLMHEGeq2Fb7PYTiuSht4PMMmiZbORC5AwzIT70tQzdi07ZM ioMu3ucss0j4aoVQ0NsKfc3B2QuRe3k49zjDu9R9vPZArQPiyZqQRZCJmHYtFj1Yh+jl vcwIuTTc1JOsRQfI2xGnShYxxXNoJ6yQ2Fr2tKChOBxnp5yvs1DAneg5tHokMHjQfLeJ W1og== X-Gm-Message-State: AJaThX4xp4j7Ld5mhHUHTLneEKKq6FWKXWLMBjGYg3kO37fEEokrw3St m5f4o7IuCc3Qs5EYnTMmTcyOfYIo X-Google-Smtp-Source: ABhQp+SV/pJopX/UWBnOF+IF6ciJyLu1kIiwXDsoh7HzrY+sFortPtm0j2AAIZmJibS67Kh4S8EWPg== X-Received: by 10.223.157.207 with SMTP id q15mr1769756wre.223.1510275959989; Thu, 09 Nov 2017 17:05:59 -0800 (PST) Return-Path: <[email protected]> Received: from localhost (165.ip-91-134-133.eu. [91.134.133.165]) by smtp.gmail.com with ESMTPSA id y48sm2287339wrb.41.2017.11.09.17.05.59 for <[email protected]> (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 17:05:59 -0800 (PST) Message-ID: <[email protected]> MIME-Version: 1.0 Content-class: urn:content-classes:calendarmessage Content-Type: text/html; charset=UTF-8 From: Pro <[email protected]> To: [email protected] Reply-To: [email protected] Subject: Appointment Date: Fri, 10 Nov 2017 02:05:58 +0100 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-Type: text/html; charset=3DUTF-8Content-Transfer-Encoding: 8bit<htm= l><body><p>Your appointment details</p><= /body></html>------Meeting Booking----03ec89542da6b334f06c768d4fe884dd Content-Type: text/calendar;name=3D"rdv.ics";method=3DREQUESTContent-Transf= er-Encoding: 8bitBEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH BEGIN:VEVENT ORGANIZER;CN=3D"Pro":MAILTO:[email protected] ATTENDEE;CN=3D"":MAILTO:[email protected] UID:[email protected] DTSTAMP;TZID=3D"Europe/Paris":20171110T20558 DTSTART;TZID=3D"Europe/Paris":20171130T170000 DTEND;TZID=3D"Europe/Paris":20171130T173000 TRANSP:OPAQUE SEQUENCE:1 SUMMARY:MyAppointment LOCATION:MyLocation CLASS:PUBLIC PRIORITY:5 BEGIN:VALARM TRIGGER:-PT15M ACTION:DISPLAY DESCRIPTION:Reminder END:VALARM END:VEVENT END:VCALENDARDo you have any idea of what’s wrong here ?
Thank you !PHP v7.0
Wordpress v4.8.3
Viewing 1 replies (of 1 total)
-
Hi,
We aren’t able to re-generate the problem at our end.
Please ensure that there are no other smtp plugins installed and activated at the same time.
Thanks
Viewing 1 replies (of 1 total)
The topic ‘Attachement and custom headers’ is closed to new replies.