PHPMailer DKIM signature_incorrect - phpmailer

I'm trying to setup DKIM for my PHP emails, but when I send email to isnotspam.com, it is saying:
X_DKIM_Status: fail (signature_incorrect)
I generated a public/private rsa key pair with ssh-keygen with no password. I've put the private key on my server, and the public key into my DNS records:
TXT default._domainkey v=DKIM1;t=s;p=XXXXXXXXX
I'm using PHPMailer to send the code on a GoDaddy shared server. The PHP version is out of date, so I have to use version 5.2 of PHPMailer:
// Start of PHP code
$mail = new PHPMailer();
$mail->isSMTP();
$mail->Host = "localhost";
$mail->SMTPAuth = true;
$mail->Username = $username;
$mail->Password = $password;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->setFrom($email, $name);
$mail->addAddress($email_address, "");
// Setup DKIM
$mail->DKIM_domain = "letmein.org";
$mail->DKIM_private = $key_path;
$mail->DKIM_selector = "default";
$mail->DKIM_passphrase = "";
$mail->DKIM_identity = $mail->From;
// Send the email
$mail->isHTML(true);
$mail->Body = $html;
$mail->AltBody = "Plain text";
$mail->Subject = $subject;
$mail->send();
The email is sending fine, but failing the DKIM checks. I've tried replacing the existing keys with new ones generated using a website specifically for DKIM keys (also checked the new public key in the DNS records were being picked up).
The original email:
From mark#letmein.org Sun Dec 24 16:05:48 2017
Return-path: <mark#letmein.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
localhost.localdomain
X-Spam-Flag: YES
X-Spam-Level: ****
X-Spam-Report:
* -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no
* trust
* [188.121.43.193 listed in list.dnswl.org]
* 3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100%
* [score: 1.0000]
* -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3)
* [188.121.43.193 listed in wl.mailspike.net]
* -0.0 SPF_PASS SPF: sender matches SPF record
* 0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100%
* [score: 1.0000]
* 0.1 HTML_MESSAGE BODY: HTML included in message
* 0.8 MPART_ALT_DIFF BODY: HTML and text parts are different
* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
* domain
* 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
* valid
* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
* -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders
X-Spam-Status: Yes, hits=4.5 required=-20.0 tests=BAYES_99,BAYES_999,
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,MPART_ALT_DIFF,
RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=no
autolearn_force=no version=3.4.0
Envelope-to: ins-xqvykojr#isnotspam.com
Delivery-date: Sun, 24 Dec 2017 16:05:48 +0000
Received: from n1nlsmtp03.shr.prod.ams1.secureserver.net ([188.121.43.193])
by localhost.localdomain with esmtp (Exim 4.84_2)
(envelope-from <mark#letmein.org>)
id 1eT8mZ-000CeP-TQ
for ins-xqvykojr#isnotspam.com; Sun, 24 Dec 2017 16:05:48 +0000
Received: from n1plcpnl0106.prod.ams1.secureserver.net ([188.121.57.40])
by : HOSTING RELAY : with SMTP
id T8lWeadPYo71OT8lWeAKc1; Sun, 24 Dec 2017 09:04:42 -0700
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=letmein.org
; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
:Subject:From:To:Date:Sender:Reply-To:Cc:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
List-Post:List-Owner:List-Archive;
bh=okJ3Yvq2jDr8JtULj6ItIiWaJF2OOV2IKKV7bcEXKD8=; b=FwSTkJ4lmwddF4ql5xz6ZlDxAm
DFRNxX7DjFrJXgcrJAwmk+GFR6vuj9yIeU0Sv7sZx3CTPdTVPNcmXYUrEEbeOEULCg6Gtvq5Iiocy
TPhVuPoz9vKlp59oIY20iIGBGb4Exa46GZJl7myIme8p8zAqs2JvDoBYxjCihbBxY79Ccebr+7kKS
Rhtx8eNsiZgXfNRAkVYeRHwGS0RgFVSt+7OdBJgTKGrmFRYgAwNMsngl/kicSgdpR6l1aZCKiTLqz
8gVeXXZ3CaHgupEc11m3m4y2B1igYiLGB1OBsbYI0oxgoOMDpWz2cGUFqJWOYzih4nlwMchZsPydT
qfXbWL+Q==;
Received: from [127.0.0.1] (port=40914 helo=www.letmein.org)
by n1plcpnl0106.prod.ams1.secureserver.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.89)
(envelope-from <mark#letmein.org>)
id 1eT8lW-001NfM-PR
for ins-xqvykojr#isnotspam.com; Sun, 24 Dec 2017 09:04:42 -0700
Date: Sun, 24 Dec 2017 16:04:37 +0000
To: ins-xqvykojr#isnotspam.com
From: Mark McCorrie <mark#letmein.org>
Subject: Test Email
Message-ID: <5335fe27777b3c14ed79690ca2bb1584#www.letmein.org>
X-Mailer: PHPMailer 5.2.26 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="b1_5335fe27777b3c14ed79690ca2bb1584"
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=394; s=default;
t=1514131477; c=relaxed/simple;
h=From:To:Date:Subject;
d=letmein.org; i=mark#letmein.org;
z=From:=20Mark=20McCorrie=20<mark#letmein.org>
|To:=20ins-xqvykojr#isnotspam.com
|Date:=20Sun,=2024=20Dec=202017=2016:04:37=20+0000
|Subject:=20Test=20Email;
bh=okJ3Yvq2jDr8JtULj6ItIiWaJF2OOV2IKKV7bcEXKD8=;
b=DdTZwAhwG5veqdzYalqHZemZxrI8jP3nN60bYQ3QLB1SizMeXJPY3CDASb0jD0p7jvPJ7S0EWVRGUd4OYf4G9JOtuPJ5gyXcIaLskHaR1C2UkK7VEsdULpTuBOyi7NNNykKj0Bb/Phf4E9a5KS1fTQ/zeRHcUuaTlCqUqmKxsfQ=
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - n1plcpnl0106.prod.ams1.secureserver.net
X-AntiAbuse: Original Domain - isnotspam.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - letmein.org
X-Get-Message-Sender-Via: n1plcpnl0106.prod.ams1.secureserver.net: authenticated_id: mark#letmein.org
X-Authenticated-Sender: n1plcpnl0106.prod.ams1.secureserver.net: mark#letmein.org
X-Source:
X-Source-Args:
X-Source-Dir:
X-CMAE-Envelope: MS4wfPwC1Xxnn9g6j5zbro5YKM7KLqmVfWh0KVY65g/CeDYX+99xryWgrTFmrIqXyjax2lhli+BPTzUFMcNEi0jmyvPoh7bb5eN1483k57SPVgGzVF736hje
JeW4+Womlh7Mp70ZEMTbXH9nJ5WO+R98qk7fuq1gLqB6PO1Y4OZ4NW8e52fTMhNAsNPTqEjdZs56FumTu5tMlbJRhCDFtwc51/s=
X-DKIM-Status: fail (signature_incorrect)
X-DKIM-Status: pass (mark#letmein.org)
This is a multi-part message in MIME format.
--b1_5335fe27777b3c14ed79690ca2bb1584
Content-Type: text/plain; charset=us-ascii
Plain text
--b1_5335fe27777b3c14ed79690ca2bb1584
Content-Type: text/html; charset=us-ascii
<html><body>
<p>Hi Mark,</p>
<p>This is a test email to see if you are using DKIM correctly.</p></body></html>
--b1_5335fe27777b3c14ed79690ca2bb1584--
Any ideas?
P.s. I've been fiddling around with keys and the current DNS record might not align with the original email above.

Related

Docusign Email Address Undefined

I am sending an envelope using the Send to Docusign button, but i am getting an error
Invalid envelope.Email address is undefined.
Please find the below code which i have written on the Docusign Button
{!URLFOR("/apex/dsfs__DocuSign_CreateEnvelope", null,[SourceID = Authority_Granting__c.Id,
DST = $Label.Docusign_Template,
CCRM = "Decision Maker - Signer 1",
CCTM = "Decision Make",
CRL = "Email~"+ Authority_Granting__c.OwnerEmail+";FirstName~"+ Authority_Granting__c.Name +";LastName~" + Authority_Granting__c.Name + ";Role~Signer_1,RoutingOrder~1",
LA = '0',
LF = '0'])
}
You need to ensure that the Authority_Granting__c.OwnerEmail is a good email address.
To debug:
Does the button ever work? Or never works?
Check the API log on DocuSign to see exactly what is being sent to create the envelope. See https://support.docusign.com/en/guides/ndse-user-guide-api-request-logging
As a test, try setting the button to check that the rest of your button is working as expected.
CRL = "Email~"+ "your_email#your_domain.com" +";FirstName~"+ Authority_Granting__c.Name +";LastName~" + Authority_Granting__c.Name + ";Role~Signer_1,RoutingOrder~1",

How can I use Knowledge Based Authentication with Embedded Signing (Recipient View)?

I want to use knowledge based auth with as the authentication method specified in recipient view request. Right now, I have authentication_method set to 'None' because nowhere in the docusign documentation have they specified which parameter strings they accept for that. In docusign sandbox, were have a lot of templates where each role is manually defined as requiring KBA, but when I send the envelopes they are not being asked these questions. I think it is because in recipient view request I am specifying that auth_method is None, but again, I don't see a way out of this, not do I know any alternatives since it's not laid out in the documentation. I'm using the python SDK
374 authentication_method = 'None'
378 recipient_view_request = RecipientViewRequest(
379 authentication_method=authentication_method,
380 client_user_id='1',
381 return_url=return_url,
382 user_name='name'
383 email='email'
384 )
Great Question. Thanks Davis. You do that in the Recipient object not the ViewRequest. We're in the process of getting the Python code samples updated to add this example. Here is the C# code we have for now:
Signer signer1 = new Signer()
{
Name = signerName,
Email = signerEmail,
ClientUserId = "1", // Optional: sets the signer as embedded
RoutingOrder = "1",
Status = "Created",
DeliveryMethod = "Email",
RecipientId = "1", //represents your {RECIPIENT_ID}
Tabs = signer1Tabs,
RequireIdLookup = "true", //will use recipient auth
IdCheckConfigurationName = "ID Check" //indicates KBA Auth
};
Note that "ID Check" is KBA and not IDV.
Also note, that you do need "Email" as that's how the recipient gets the notice about the envelope.
This example assumes you defined your tabs elsewhere in the signer1Tabs object.
I think it should be simple to get this to work in Python. Let me know if you still can't get it.
One last note - your account should have KBA enabled. If you created your sandbox recently in DocuSign - it should, but if you have an old one - it may not.

hyperledger-fabric v1.1.0: register user with attributes fails

At work we are using the ibm cloud blockchain 1.1.0 and it is required to create a user with attributes encoded in the certificate.
Unfortunately trying to encode this fails with the following error.
Error Code: 20 - Authorization failure
github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib.(*Client).SendReq
/go/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/client.go:470
github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib.(*Identity).Post
/go/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/identity.go:328
github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib.(*Identity).Register
/go/src/github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric-ca/lib/identity.go:80
github.com/hyperledger/fabric-sdk-go/pkg/msp.(*fabricCAAdapter).Register
/go/src/github.com/hyperledger/fabric-sdk-go/pkg/msp/fabcaadapter.go:110
github.com/hyperledger/fabric-sdk-go/pkg/msp.(*CAClientImpl).Register
/go/src/github.com/hyperledger/fabric-sdk-go/pkg/msp/caclient.go:314
github.com/hyperledger/fabric-sdk-go/pkg/client/msp.(*Client).Register
/go/src/github.com/hyperledger/fabric-sdk-go/pkg/client/msp/client.go:374
Here is the Register new user function body I use to call mspClient.Register.
// Register the new user
func (e *HfcEndpoint) RegisterUser(username string, args []string) error {
attributes := []msp.Attribute{}
// normal user with id attribute
attributes = append(attributes, msp.Attribute{
Name: "hf.Registrar.Roles",
Value: "validator",
ECert: true,
})
registrationRequest := &msp.RegistrationRequest{
Name: username,
Type: "validator",
Affiliation: e.orgID,
Attributes: attributes,
}
enrollmentSecret, err := e.mspClient.Register(registrationRequest)
if err != nil {
return errors.Wrapf(err, "Failed to register user - %s", username)
}
err = e.mspClient.Enroll(username, msp.WithSecret(enrollmentSecret))
if err != nil {
return errors.Wrapf(err, "Failed to enroll user - %s", username)
}
return nil
}
I tried to make sure in this example to only use a standard attribute the admin is created with by that managed ibm blockchain. So the admin should be capable of encoding this attribute for another user as well.
(admin atributes: hf.Registrar.Roles:client,user,peer,validator,auditor)
However I try it though, it fails.
I followed the unit tests of the fabric-sdk-go and the documentation of the fabric-ca:
msp/enrollment_test.go
Register new Identity 1.1.0 documentation
I read in the docs that the admin needs to have the proper attributes in order to register them for someone else.
However, it is confusing that if I extract the admin certificate used in the fabric-sdk-go unit test I do not find any attributes encoded into the admin cert used for those tests either.
$>openssl x509 -in admin.pem -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
84:24:6e:1f:67:b0:69:cb:98:36:a5:01:59:63:f2:c5
Signature Algorithm: ecdsa-with-SHA256
Issuer: C=US, ST=California, L=San Francisco, O=org1.example.com, CN=ca.org1.example.com
Validity
Not Before: Jul 28 14:27:20 2017 GMT
Not After : Jul 26 14:27:20 2027 GMT
Subject: C=US, ST=California, L=San Francisco, CN=Admin#org1.example.com
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (256 bit)
pub:
04:7e:61:10:27:f1:d1:69:0d:00:f2:bc:30:3b:24:
a3:e5:e4:fa:19:7a:78:f7:9b:52:8e:9c:ca:f2:fe:
63:99:72:75:e7:4c:88:76:01:25:78:b2:cf:15:96:
ec:c1:73:21:c6:02:fe:c1:0a:6c:57:c4:39:23:71:
5f:5e:c9:bb:fc
ASN1 OID: prime256v1
NIST CURVE: P-256
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature
X509v3 Basic Constraints: critical
CA:FALSE
X509v3 Authority Key Identifier:
keyid:87:91:D1:36:3E:89:51:5F:9A:FA:04:2B:06:93:A2:C7:04:BB:8D:D9:5D:28:F9:7D:35:49:A2:B9:E3:C4:35:2D
Signature Algorithm: ecdsa-with-SHA256
30:45:02:21:00:d5:7f:c7:0b:36:b7:d3:a2:23:f3:26:91:05:
3c:61:7e:ff:c0:a9:cc:e9:25:f7:5a:33:f9:72:6c:bd:d8:1f:
e7:02:20:23:f7:bc:9a:9b:e9:a6:55:10:6d:4e:76:f8:b7:a3:
03:7e:83:0a:c6:d6:11:1b:d9:3e:34:7f:18:51:03:12:f7
I hope someone can help me solving how to create a user with attributes through the fabric-sdk-go or is able to point me towards something I missed.
Thanks in advance

Gmail API playground: Send method, converted MIME raw header not populating email fields on send

I'm using the Google OAuth 2.0 Playground and attempting to send an email. The autentication is working fine. Here is the very simple message I'm trying to send (email address changed to prevent spam):
to: 'Michael To' <FakeMichael#gmail.com>
from: 'John From' <JohnF#mydomain.com>
subject: 'Test Message'
htmlBody: '<b>HI!</b><br>Test Message'
I convert that to Base64 RFC 822 using VBA which gets me this (I've tried swapping the "+" and the "-" per other StackOverflow posts but to no avail):
dG86ICdNaWNoYWVsIFRvJyA8RmFrZU1pY2hhZWxAZ21haWwuY29tPg1mcm9tOiAnSm9obiBGcm9tJyA8Sm9obkZAbXlkb21haW4uY29tPg1zdWJqZWN0OiAnVGVzdCBNZXNzYWdlJw1odG1sQm9keTogJzxiPkhJITwvYj48YnI-VGVzdCBNZXNzYWdlJw==
In the Playground my method is POST and I've added 2 headers:
raw: and the Base64 string above (no quotes or anything)
Content-Type: message/rfc822 <I added this because I kept getting an a different error. Putting this prevetned that error>
Request URI (removed the https cause SO won't let me post more than 2 links)://www.googleapis.com/upload/gmail/v1/users/me/messages/send
I click "send the request" and get an OK response:
Here is my request:
POST /upload/gmail/v1/users/me/messages/send HTTP/1.1
Host: www.googleapis.com
Raw: <string above>
Content-length: 0
Content-type: message/rfc822
Authorization: Bearer <my token>
Response:
HTTP/1.1 200 OK
Alternate-protocol: 443:quic,p=1
Content-length: 91
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Vary: Origin, X-Origin
Server: UploadServer ("Built on Jun 6 2015 11:14:45 (1433614485)")
Etag: "YAnoF_dHYOakPARISZQhTvRsqto/nwevNUuzaUU_lB19L-UhrwaaUSM"
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
Date: Wed, 10 Jun 2015 15:59:36 GMT
Content-type: application/json; charset=UTF-8
{
"labelIds": [
"SENT"
],
"id": "14dde32bc92c9XYZ",
"threadId": "14dde32bc92c9XYZ"
}
However, when I go to my Gmail sent mail folder, the message is there but nothing is in the To, Subject, or Body is field: See Screenshot
I have to imagine this is something simple, but as I'm new to the Google Gmail API, MIME, and dealing with Raw Base64 stuff, I'm not having much luck.
Thanks in advance for any assistance.
--- EDIT PER THOLLE'S Response ---
That helps! I removed the raw base64 string header and put:
From: 'John From' <JohnF#mydomain.com>
Subject: Test Message
To: 'Michael To' <FakeMichael#gmail.com>
Test Message
into the "Enter request body" and it sends, which is great!
Three Follow up questions:
Are there any security risks or limitations (max length? I see there might be a 2mb limitation but that would be a lot of text.) sending it this way (in the body) opposed to a raw Base64 string in the header?
(I'll dig more on this) How do I make the message body HTML? Does the content type of "Content-Type: message/rfc822" prevent me from being able to send it HTML? Sending it HTML is a requirement for this application and I can't have two content types, is there an HTML parameter I can use or am I out of luck?
(I'll do homework on this as well) How do I include an attachment, say a PDF file, with the email?
Thanks again!
I think you are violating a few minor details of the RFC 822 standard:
It is recommended
that, if present, headers be sent in the order "Return-
Path", "Received", "Date", "From", "Subject", "Sender",
"To", "cc", etc.
I can't find it for the life of me, but I also think that the headers has to have their first character capitalized. Try this:
From: John From <JohnF#mydomain.com>
Subject: Test Subject
To: Michael To <FakeMichael#gmail.com>
Test Message
You also don't want to send the base64-encoded mail if you choose message/rfc822 as your Content-Type. Just supply the example mail above as is.
POST /upload/gmail/v1/users/me/messages/send HTTP/1.1
Host: www.googleapis.com
Content-length: 108
Content-type: message/rfc822
Authorization: Bearer {YOUR_ACCESS_TOKEN}
From: John From <JohnF#mydomain.com>
Subject: Test Subject
To: Michael To <FakeMichael#gmail.com>
Test Message
If you want HTML, just modify your message to this:
From: John From <JohnF#mydomain.com>
Subject: Test Subject
To: Michael To <FakeMichael#gmail.com>
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<b>Test Message</b>

PHPMailer Body gets truncated

I'm having some strange issues with PHPMailer. I'm trying to send some content which I generate with PHP in HTML and plain text, but the body gets truncated. What's even stranger is that this happens only to the email I generate, if I put in there some generic content in much greater length, it gets sent properly. I must also mention, I did echo the content of both $content and $nohtmlcontent variables and everything is there like it should be, but when I receive email into my mailbox, it's truncated.
My PHP code for creating plain text and HTML email body:
$content="<BODY bgColor=\"#ffffff\"><FONT face=\"Verdana\" size=\"2\">";
$content.="Hello $name.<br /><br />Administrator of $url has created a new account for you.<br /><br />Your new account details:<br />";
$content.=$message."<br /><br />";
$content.="If you see something wrong, please reply with correct details and we will update your account.<br /><br />";
$content.="Have a nice day,<br />$url</FONT></FONT></BODY>";
$nohtmlcontent="Hello $name.\n\nAdministrator of $url has created a new account for you.\n\nYour new account details:\n\n";
$nohtmlcontent.=$usrEmail."\n\n";
$nohtmlcontent.="If you see something wrong, please reply with correct details and we will update your account.\n\n";
$nohtmlcontent.="Have a nice day,\n$url";
All variables are populated with proper data.
My PHPMailer code for sending email:
require_once("class.phpmailer.php");
$mail=new PHPMailer(true);
try {
$mail->AddAddress($email);
$mail->SetFrom('admin#example.com', 'example.com');
$mail->CharSet = 'UTF-8';
$mail->Subject = "New account for you";
$mail->IsHTML(true);
$mail->AltBody = $nohtmlcontent;
$mail->Body = $content;
$mail->Send();
return true;
}catch(phpmailerException $e){
trigger_error("PHPMailer failed: ".$e->errorMessage());
return false;
}
Result:
Hello 12 23.
Administrator of admin.localhost.dev has created a new account for you.
Your new account details:
Username: user1
Password: 123456
E-Mail Address: info#tourazore.com
Subscription Status: Not Verified (you must verify your email address before you can use your account)
Package: Free (limitations: 1 tour, 5 items)
First Name: 12
Last Name: 23
City 34
Country 45
Your verification link: http://admin.localhost.dev/verify-account/882672636ce2ad8c498f75a9b836ff055aecf573/
If you see something wrong, please reply with correct details and we will update you
Expected result:
Hello 12 23.
Administrator of admin.localhost.dev has created a new account for you.
Your new account details:
Username: user1
Password: 123456
E-Mail Address: info#tourazore.com
Subscription Status: Not Verified (you must verify your email address before you can use your account)
Package: Free (limitations: 1 tour, 5 items)
First Name: 12
Last Name: 23
City 34
Country 45
Your verification link: http://admin.localhost.dev/verify-account/882672636ce2ad8c498f75a9b836ff055aecf573/
If you see something wrong, please reply with correct details and we will update your account.
Have a nice day,
admin.localhost.dev
Please notice the extra content in the end.
I have also tried using PHP's function mail() to send the same content, it also gets truncated.
Any ideas?
SOLUTION: The PHP code generated really long line, after adding a few newline characters, the complete content got through.
Also this may not be related but you're using Body and not MsgHTML
$mail->Body = $content;
But it looks like your using HTML expressions in your content.
I'm fairly new to this but from what I've read to use HTML in PHPMailer you should use
$mail->MsgHTML = $content;
Although your text looks likes it is displaying fine and you solved your problem. But I thought I'd share incase it helps.
Some useful info here
https://phpbestpractices.org/
(scroll down to email info)
and here:
https://github.com/PHPMailer/PHPMailer

Resources