I have an issue but only occurring with Outlook. In Gmail it works.
The url is https://somewebsite/en/account-verification?email=some#email.com&verification_code=some_code
But when you hover over the link in the mail you get only https://somewebsite/en.
when I view the source, the link is:
https://somewebsite/en/account-verification?email=some#email.com&verification_code=some_code
I thought the issue was because of the "&". But that's not the case because when I check to other mails I get like for example Facebook, they have the same and it works.
The link is valid on the website.
The content of the email is the content of an html file which has a tag
Below you can see my PHPMailer settings
$mail->SMTPDebug = false;
$mail->isSMTP();
$mail->Host = 'smtp-auth.mailprotect.be';
$mail->SMTPAuth = true;
$mail->Username = 'xxx';
$mail->Password = 'xxx';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
//Recipients
$mail->setFrom($from, $from_name);
$mail->addAddress($to);
//Content
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = $content;
$mail->send();
The headers which I think matter to help:
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
UPDATE: I've added SMTPDebug = 2 to have the logs:
2022-08-05 17:22:15 SERVER -> CLIENT: 220 smtp-auth.mailprotect.be ESMTP - Welcome<br>
2022-08-05 17:22:15 CLIENT -> SERVER: EHLO www.xxx.xx<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 250-smtp-auth.mailprotect.be250-PIPELINING250-SIZE 52428800250-VRFY250-ETRN250-AUTH PLAIN LOGIN250-AUTH=PLAIN LOGIN250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250 CHUNKING<br>
2022-08-05 17:22:15 CLIENT -> SERVER: AUTH LOGIN<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 334 VXNlcm5hbWU6<br>
2022-08-05 17:22:15 CLIENT -> SERVER: [credentials hidden]<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 334 UGFzc3dvcmQ6<br>
2022-08-05 17:22:15 CLIENT -> SERVER: [credentials hidden]<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 235 2.7.0 Authentication successful<br>
2022-08-05 17:22:15 CLIENT -> SERVER: MAIL FROM:<xxxx#xxx.xx><br>
2022-08-05 17:22:15 SERVER -> CLIENT: 250 2.1.0 Ok<br>
2022-08-05 17:22:15 CLIENT -> SERVER: RCPT TO:<xxxx#xxx.xx><br>
2022-08-05 17:22:15 SERVER -> CLIENT: 250 2.1.5 Ok<br>
2022-08-05 17:22:15 CLIENT -> SERVER: DATA<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 354 End data with <CR><LF>.<CR><LF><br>
2022-08-05 17:22:15 CLIENT -> SERVER: Date: Fri, 5 Aug 2022 19:22:15 +0200<br>
2022-08-05 17:22:15 CLIENT -> SERVER: To: xxxx#xxx.xx<br>
2022-08-05 17:22:15 CLIENT -> SERVER: From: Support <xxxx#xxx.xx><br>
2022-08-05 17:22:15 CLIENT -> SERVER: Subject: Confirm your email address<br>
2022-08-05 17:22:15 CLIENT -> SERVER: Message-ID: <tiPohR4zaO04Mccof0KMXEmdZaylCONxkFoOE9eSHU#www.xxx.xx><br>
2022-08-05 17:22:15 CLIENT -> SERVER: X-Mailer: PHPMailer 6.6.3 (https://github.com/PHPMailer/PHPMailer)<br>
2022-08-05 17:22:15 CLIENT -> SERVER: MIME-Version: 1.0<br>
2022-08-05 17:22:15 CLIENT -> SERVER: Content-Type: text/html; charset=iso-8859-1<br>
2022-08-05 17:22:15 CLIENT -> SERVER: <br>
2022-08-05 17:22:15 CLIENT -> SERVER: <!DOCTYPE html><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <head><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <title></title><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <meta name="viewport" content="width=device-width,initial-scale=1"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <!--[if mso]><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <xml><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <o:OfficeDocumentSettings><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <o:PixelsPerInch>96</o:PixelsPerInch><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <o:AllowPNG/><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </o:OfficeDocumentSettings><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </xml><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <![endif]--><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <style><br>
2022-08-05 17:22:15 CLIENT -> SERVER: *{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}#media (max-width:660px){.desktop_hide table.icons-inner{display:inline-block!important}.icons-inner{text-align:center}.icons-inner td{margin:0 auto}.row-content{width:100%!important}.image_block img.big{width:auto!important}.column .border,.mobile_hide{display:none}table{table-layout:fixed!important}.stack .column{width:100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width:0;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}<br>
2022-08-05 17:22:15 CLIENT -> SERVER: </style><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </head><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <body style="background-color:#f8f8f9;margin:0;padding:0;-webkit-text-size-adjust:none;text-size-adjust:none"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="nl-container" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0;background-color:#f8f8f9"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table<br>
2022-08-05 17:22:15 CLIENT -> SERVER: class="row row-3" align="center" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="row-content stack" align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0;background-color:#fff;color:#000;width:640px" width="640"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td class="column column-1" width="100%" <br>
2022-08-05 17:22:15 CLIENT -> SERVER: style="mso-table-lspace:0;mso-table-rspace:0;font-weight:400;text-align:left;vertical-align:top;padding-top:0;padding-bottom:0;border-top:0;border-right:0;border-bottom:0;border-left:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="image_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td style="width:100%;padding-right:0;padding-left:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div align="center" style="line-height:10px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <a href="https://xxxxx.xx/en" target="_blank" style="outline:none" tabindex="-1"><img class="big" src="https://xxxxx.xx/images/emails/mathew-schwartz--bAZGsko_po-unsplash-720.jpg" style="display:block;height:auto;border:0;width:640px;max-width:100%" width="640" alt="Logo Company" title="Logo Company"></a><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="divider_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" <br>
2022-08-05 17:22:15 CLIENT -> SERVER: style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td style="padding-top:30px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div align="center"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td class="divider_inner" style="font-size:1px;line-height:1px;border-top:0 solid #bbb"><span> </span></td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="text_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" <br>
2022-08-05 17:22:15 CLIENT -> SERVER: style="mso-table-lspace:0;mso-table-rspace:0;word-break:break-word"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td style="padding-bottom:10px;padding-left:40px;padding-right:40px;padding-top:10px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div style="font-family:Arial,sans-serif"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div class="txtTinyMce-wrapper" style="font-size:12px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;mso-line-height-alt:14.399999999999999px;color:#555;line-height:1.2"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <p style="margin:0;font-size:16px;text-align:center"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <span style="font-size:30px;color:#dd204e;"><strong>Welcome at Company!</strong></span><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </p><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="text_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0;word-break:break-word"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td style="padding-bottom:10px;padding-left:40px;padding-right:40px;padding-top:10px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div style="font-family:sans-serif"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div class="txtTinyMce-wrapper" <br>
2022-08-05 17:22:15 CLIENT -> SERVER: style="font-size:12px;font-family:Montserrat,Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif;mso-line-height-alt:18px;color:#555;line-height:1.5"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <p style="margin:0;font-size:14px;text-align:left;font-family:inherit;mso-line-height-alt:22.5px"><span style="color:#808389;font-size:15px;">Dear Yannick,</span></p><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <br><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <p style="margin:0;font-size:14px;text-align:left;font-family:inherit;mso-line-height-alt:22.5px"><span style="color:#808389;font-size:15px;">You registered an account on xxxx.xx, before being able to use your account you need to verify that this is your email address by clicking here:</span></p><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <br><br><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div align="center"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <!--[if mso]><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://xxxxx.xx/en" style="height:62px;width:209px;v-text-anchor:middle;" arcsize="57%" stroke="false" fillcolor="#dd204e"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <w:anchorlock/><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <v:textbox inset="0px,0px,0px,0px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <center style="color:#ffffff; font-family:Arial, sans-serif; font-size:16px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <![endif]--><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <a href="https://www.xxx.xx/en/account-verification?email=xxxx#xxx.xx&verification_code=613dbf3699a7cc42bd68f67cf8989992" target="_blank" style="text-decoration:none;display:inline-block;color:#ffffff;background-color:#dd204e;border-radius:35px;width:auto;border-top:1px solid #dd204e;font-weight:undefined;border-right:1px solid #dd204e;border-bottom:1px solid #dd204e;border-left:1px solid #dd204e;padding-top:15px;padding-bottom:15px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;text-align:center;mso-border-alt:none;word-break:keep-all;"><span style="padding-left:30px;padding-right:30px;font-size:16px;display:inline-block;letter-spacing:normal;"><span style="font-size: 16px; margin: 0; line-height: 2; word-break: break-word; mso-line-height-alt: 32px;"><strong>Verify now</strong></span></span></a><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <!--[if mso]><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </center><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </v:textbox><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </v:roundrect><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <![endif]--><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <br><br><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <p style="margin:0;font-size:14px;text-align:left;font-family:inherit;mso-line-height-alt:22.5px"><span style="color:#808389;font-size:15px;">Kind regards,<br>Company Support Team </span></p><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table class="divider_block" width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td style="padding-bottom:12px;padding-top:60px"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <div align="center"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%" style="mso-table-lspace:0;mso-table-rspace:0"><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <td class="divider_inner" <br>
2022-08-05 17:22:15 CLIENT -> SERVER: style="font-size:1px;line-height:1px;border-top:0 solid #bbb"><span> </span></td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </div><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <!-- End --><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </td><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tr><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </tbody><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </table><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </body><br>
2022-08-05 17:22:15 CLIENT -> SERVER: </html><br>
2022-08-05 17:22:15 CLIENT -> SERVER: <br>
2022-08-05 17:22:15 CLIENT -> SERVER: .<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 250 2.0.0 Ok: queued as CA5A7C0142<br>
2022-08-05 17:22:15 CLIENT -> SERVER: QUIT<br>
2022-08-05 17:22:15 SERVER -> CLIENT: 221 2.0.0 Bye<br>
I've been doing numerous permutations between the values of the following properties: Encoding, CharSet, ContentType, isHtml + Body versus MsgHTML, ...
Comparing mail headers between mails from Facebook and the mail that I'm sending...
Stackoverflow is my last resort before getting cray :p.
Any help will be very valuable.
Thanks!
Finally found out why.
in my html template, I have an exception for mso. But in my editor, that exception is greyed out because it's in html comment (<!--). I's also greyed out by Stackoverflow as well ;) So I always overlooked that part
<div align="center">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://xxx.xx/en" style="height:62px;width:209px;v-text-anchor:middle;" arcsize="57%" stroke="false" fillcolor="#dd204e">
<w:anchorlock/>
<v:textbox inset="0px,0px,0px,0px">
<center style="color:#ffffff; font-family:Arial, sans-serif; font-size:16px">
<![endif]-->
<span style="padding-left:30px;padding-right:30px;font-size:16px;display:inline-block;letter-spacing:normal;"><span style="font-size: 16px; margin: 0; line-height: 2; word-break: break-word; mso-line-height-alt: 32px;"><strong>Verify now</strong></span></span>
<!--[if mso]>
</center>
</v:textbox>
</v:roundrect>
<![endif]-->
<br><br>
<p style="margin:0;font-size:14px;text-align:left;font-family:inherit;mso-line-height-alt:22.5px"><span style="color:#808389;font-size:15px;">Kind regards,<br>Support Team </span></p>
</div>
As you can see there's a [if mso] condition. And in there you will see a static url https://xxx.xx/en. So Instead I just replaced it with the dynamic {confirmation_link} url.
Related
I am unable to run a proper transaction. I am not coding right away. I wanted to test it with POSTMAN first but I seem to be running in to problems.
I am using the following endpoint
https://api.test.paysafe.com/cardpayments/v1/accounts/89994061
Sample Request (Code)
> {
> "merchantRefNum": "ORDER_ID:12312",
> "amount": 10098,
> "settleWithAuth": true,
> "card": {
> "cardNum": "4111111111111111",
> "cardExpiry": {
> "month": 2,
> "year": 2017
> },
> "cvv":111
> },
> "billingDetails": {
> "zip": "M5H 2N2"
> } }
Sample Response (Code)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
<HTML>
<HEAD>
<TITLE>Error 404--Not Found</TITLE>
</HEAD>
<BODY bgcolor="white">
<FONT FACE=Helvetica>
<BR CLEAR=all>
<TABLE border=0 cellspacing=5>
<TR>
<TD>
<BR CLEAR=all>
<FONT FACE="Helvetica" COLOR="black" SIZE="3">
<H2>Error 404--Not Found</H2>
</FONT>
</TD>
</TR>
</TABLE>
<TABLE border=0 width=100% cellpadding=10>
<TR>
<TD VALIGN=top WIDTH=100% BGCOLOR=white>
<FONT FACE="Courier New">
<FONT FACE="Helvetica" SIZE="3">
<H3>From RFC 2068
<i>Hypertext Transfer Protocol -- HTTP/1.1</i>:
</H3>
</FONT>
<FONT FACE="Helvetica" SIZE="3">
<H4>10.4.5 404 Not Found</H4>
</FONT>
<P>
<FONT FACE="Courier New">The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
</p>
<p>If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
</FONT>
</P>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Seems the endpoint is incorrect. I received this from your developer center. What is incorrect?
It would seem that your endpoints are missing some parameters. What you have is the basic format of the Card Payments API. If you wish to process an actual payment, you need to add certain parameters at the end. Please see example below.
Authorizations
https://api.test.netbanx.com/cardpayments/v1/accounts/89994061/auths
Settlements
https://api.test.netbanx.com/cardpayments/v1/accounts/89994061/settlements
There are many more but you can find them on the Paysafe Developer Center.
I'm having trouble with installing the email markup for "Go-To Action."
I've already verify the DKIM and SPF, which is the common reason of why this mark-up usually not working.
Can anybody check the code and let me know where I was wrong. I appreciate that a lot.
Delivered-To: itviec+jobrobot#itviec.com
Received: by 10.27.205.69 with SMTP id d66csp3167041wlg;
Wed, 2 Dec 2015 20:28:11 -0800 (PST)
X-Received: by 10.129.38.3 with SMTP id m3mr5208082ywm.306.1449116891561;
Wed, 02 Dec 2015 20:28:11 -0800 (PST)
Return-Path: <bounce-md_30049822.565fc4db.v1-17b05f83d90c4afc98d45e7150460630#mandrillapp.com>
Received: from mail133-26.atl131.mandrillapp.com (mail133-26.atl131.mandrillapp.com. [198.2.133.26])
by mx.google.com with ESMTPS id i184si3884636ywi.323.2015.12.02.20.28.11
for <itviec+jobrobot#itviec.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Wed, 02 Dec 2015 20:28:11 -0800 (PST)
Received-SPF: pass (google.com: domain of bounce-md_30049822.565fc4db.v1-17b05f83d90c4afc98d45e7150460630#mandrillapp.com designates 198.2.133.26 as permitted sender) client-ip=198.2.133.26;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of bounce-md_30049822.565fc4db.v1-17b05f83d90c4afc98d45e7150460630#mandrillapp.com designates 198.2.133.26 as permitted sender) smtp.mailfrom=bounce-md_30049822.565fc4db.v1-17b05f83d90c4afc98d45e7150460630#mandrillapp.com;
dkim=pass header.i=#itviec.com;
dkim=pass header.i=#mandrillapp.com
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mandrill; d=itviec.com;
h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=itviec+jobrobot#itviec.com;
bh=9p1iDE8OCI5f1Cs1aLQ1TfefDaY=;
b=WiDGxt547LeTZdT9OLDWHLDiYM4rDD5Ild9/g+w29AxZl8F8spWi51HOyZkrNcgXSXGTUN0MP1TX
0uwcP05uVQDuINJUaWYkDC4uQrbciEITg8HbJHq3OH63lNW5/wDfOEROoVcPiACtNzKF3Te4aySZ
/3tkJgYcmQfwUZtn2Ds=
DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=itviec.com;
b=QFc22xXF+gAVDT1qJZyKWnPh+7YcY+yO08jZt87nQW0bUfQrfmF3X2E+lyhTK8JI7ksRtKgt526e
ndasDLSw+siCqPelMNeDePkN7RLDNl5IXuEG6LnoWoBWzFOTYyH4vXGEOi0F+WmPD6aoR+RcUvxZ
CAD28a/T4w0cKDLoVvw=;
Received: from pmta02.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail133-26.atl131.mandrillapp.com id hbv2dm1sar8o for <itviec+jobrobot#itviec.com>; Thu, 3 Dec 2015 04:28:11 +0000 (envelope-from <bounce-md_30049822.565fc4db.v1-17b05f83d90c4afc98d45e7150460630#mandrillapp.com>)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com;
i=#mandrillapp.com; q=dns/txt; s=mandrill; t=1449116891; h=From :
Subject : To : Message-Id : Date : MIME-Version : Content-Type : From :
Subject : Date : X-Mandrill-User : List-Unsubscribe;
bh=r9dCb0UehKANmD5pcRPY5W2rPJcP5pLvGaFP5mqGDDM=;
b=Qp8iOYkcGl7UmlV7Yi6GCUhC4Frdqz9DGQIMiDMJJIOXJkxv+GUIzqb+6mdsFNFTMUACkP
+71Ii8L/vQLef77Pp6ls5XedXP4N8faGRrnihyK84WUxAoN+Rcl8E86lhyCA2j1VAA8CmyAS
tNNLHlxfsJCHjOw3GWL5q7VO9Su/A=
--_av-KsjmzauXlF-qEoqq3I296w
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<div itemscope itemtype=3D"http://schema.org/EmailMessage">
<div itemprop=3D"action" itemscope itemtype=3D"http://schema.org/ViewActi=
on">
<link itemprop=3D"url" href=3D"http://itviec.com/search/java?utm_campai=
gn=3DJob+Robot&utm_medium=3DJobRobot&utm_source=3DEmail&utm_ter=
m=3DView+all+your+jobs">
<meta itemprop=3D"name" content=3D"Yes, View My Jobs">
</div>
</div>
<table bgcolor=3D"#CCC" class=3D"mail" style=3D"margin-top: 10; font-family=
: 'Helvetica', san-serif; color: #444;" width=3D"100%">
<tr>
<td>
<table align=3D"center" bgcolor=3D"white" cellpadding=3D"0" cellspacing=3D"=
0" class=3D"content" style=3D"margin-top: 20px; border-radius:7px" width=3D=
"550">
<tr bgcolor=3D"#282828" class=3D"header" height=3D"75">
<td style=3D"padding: 20px 30px; border-radius:7px 7px 0px 0px;">
<a href=3D"itviec.com">
<img alt=3D"ITviec" border=3D"0" height=3D"35px" src=3D"itviec.com/assets/l=
ogo-for-email-white-color.png" style=3D"float: left" width=3D"90px">
</a>
<div class=3D"title-nav-bar" style=3D"float: right; color: #FFF; margin-top=
: 8px; font-size: 18px">
Code Awesome
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
I tested this code in Email markup tester page, and the result is "no errors detected."
#Dan Pham, I've tested your markup and was able to generate a action button. I'm assuming you haven't been whitelisted for the feature yet.
Is your email whitelisted for Gmail actions? If not, fill out this registration form to be enabled, you will also have to send a sample email with your microdata included.
You can find all the details on registering at the link below:
https://developers.google.com/gmail/markup/registering-with-google?hl=en
This is due to your =3D in your email. I don't know yet how to solve this but it should narrow your investigation.
I'm trying to log in one website using perl HTTP:Request and LWP:UserAgent. I added alI http headers which i found using Firebug and anyway get the error that CRFS Token is not defined
my $ua = LWP::UserAgent->new(keep_alive=>1);
$useragent->credentials('www.refer.org:80','','maila#gmail.com','pwd');
$request = HTTP::Request->new('POST','https://www.refer.org/account/signin',
HTTP::Headers->new(<add all headers found in the header>));
$response = $useragent->request($request);
print $response->as_string;
headers found by Firebug:
Request URL:https://bla/login
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8,de;q=0.6
Connection:keep-alive
Content-Length:58
Content-Type:application/x-www-form-urlencoded
Cookie:logout=1364426556.61; sessionid=47b306354faa7357281a6cb1f0298df1; maestro_user=%7B%22id%22%3A%22%22%2C%22email_address%22%3A%22%22%2C%22external_id%22%3A%226c104964ceb5d7ceb4575cab729ba7aa%22%2C%22photo_24%22%3A%22%22%2C%22photo_60%22%3A%22%22%2C%22photo_120%22%3A%22%22%2C%22display_name%22%3A%22%22%2C%22full_name%22%3A%22%22%2C%22privacy%22%3A100%2C%22groups%22%3A%5B%5D%2C%22is_superuser%22%3Afalse%2C%22is_staff%22%3Afalse%2C%22identity_verified%22%3Afalse%2C%22locale%22%3A%22en_US%22%2C%22timezone%22%3A%22%22%7D; __utma=158142248.1347071395.1348726747.1364423066.1364426537.88; __utmb=158142248.4.10.1364426537; __utmc=158142248; __utmz=158142248.1348726747.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); csrftoken=zUZft9KwWmmogYbjR906daJB
Host:https://www.referer.org/
Origin:https://www.referer.org/
Referer:https://www.referer.org/account/signin
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
X-CSRFToken:zUZft9KwWmmogYbjR906daJB
X-Requested-With:XMLHttpRequest
here is a response header in the Firebug if anybody is interested
Response Headersview source
Cache-Control:no-cache, no-store, must-revalidate
Connection:keep-alive
Content-Encoding:gzip
Content-Length:725
Content-Type:application/json
Date:Wed, 27 Mar 2013 23:23:18 GMT
Server:nginx/1.2.6
Set-Cookie:sessionid=1ac9a133760f02c6fb8c61daebe7fc6d; expires=Wed, 10-Apr-2013 23:23:18 GMT; httponly; Max-Age=1209600; Path=/
Set- Cookie:maestro_login="cuPT1ZexESKY8gOQaLRRoBzxTnS0diEitb7Dy4g9h9FwfWO4PM5ppRYnQlLFM6++HX5TcA1lrrly5Fi/ie1bjw==|mRCAxgo374DL1N6yNRkDOh6Zony+s8InBTugfXb/ovuNff0LfudF6Z6mVP2qz2zxIgZ/kGUCbgRcb7+KUEvLPGY8AWBa2wCAV71fgUaAysm5NAPEaXV0k4C5ErQhOldAMVvyTspAR2PIXT+T2GY0mUGtUUTvZ1G2PI5knDjxQ2lnLuJNjEn0knrOA9bRspfAq8RwCl1cCSO5VjmrSquRlCEUf8MdUBD9Ea3abyKpDyfFx0vMBa2QMjxzOBYGqou8UPDizbjL4E6E5axmXl+wRt+QwpZNHASTh3l3h5Q90R2bWtLWlNQdC+mOlC4p0UXsQkIed9J7WXgQXpYbFNf6R7395LNJhr8mz0lQBWRimGBmqJCfpeKtYYACeH22QtXnRkgQxx44VmZ3XbaiKGKOdL7b/2kw9tJQxFZC/5bPQwemWxmJMfLW8YZtxdcugoKACnpyENjuxlHm7Ndt36KXKIq2rZdtwP8joLYpQQdkc6g="; expires=Fri, 26-Apr-2013 23:23:18 GMT; Max-Age=2592000; Path=/
Vary:Cookie
Vary:Accept-Encoding
and the response as i executed the perl code
HTTP/1.1 403 FORBIDDEN
Cache-Control: no-cache, no-store, must-revalidate
Connection: keep-alive
Date: Thu, 28 Mar 2013 07:17:48 GMT
Server: nginx/1.2.6
Vary: Accept-Encoding
Content-Length: 1006
Content-Type: text/html; charset=utf-8
Content-Type: text/html; charset=utf-8
Client-Date: Thu, 28 Mar 2013 07:17:48 GMT
Client-Peer: xxx
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com,
Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification
Authority/serialNumber=07969287
Client-SSL-Cert-Subject: /O=*.refer.org/OU=Domain Control Validated/CN=*.refer.org
Client-SSL-Cipher: AES256-SHA
Client-SSL-Warning: Peer certificate not verified
Title: 403 Forbidden
X-Meta-Robots: NONE,NOARCHIVE
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>403 Forbidden</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
body { font:small sans-serif; background:#eee; }
body>div { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; margin-bottom:.4em; }
h1 span { font-size:60%; color:#666; font-weight:normal; }
#info { background:#f6f6f6; }
#info ul { margin: 0.5em 4em; }
#info p, #summary p { padding-top:10px; }
#summary { background: #ffc; }
#explanation { background:#eee; border-bottom: 0px none; }
</style>
</head>
<body>
<div id="summary">
<h1>Forbidden <span>(403)</span></h1>
<p>CSRF verification failed. Request aborted.</p>
</div>
<div id="explanation">
<p><small>More information is available with DEBUG=True.</small></p>
</div>
</body>
</html>
i didn't use 'https:// bla/login' as the website on the link is permanently unavailable
i will try WWW:Mechanism tomorrow. But here i wonder if there are any other way to define CSRF header?
I see a lot of issues in your code:
You don't POST but GETing instead (you're not using your $req
objuect!).
You don't sending cookies to the target site but Firefox sends some
cookies.
You don't set Referer header too.
Life is short so use WWW::Mechanize instead plain LWP...
P. S. you can set headers like this:
$req->header("X-CSRFToken" => "zUZft9KwWmmogYbjR906daJB", Referer => 'http://ww
w.test.com/', "X-Requested-With" => "XMLHttpRequest");
emphasized text
I am trying to create a module for magento 1.7 which will send a notification mail to admin whenever a new user subscribes to newsletter. I have succeeded so far in getting the mail sent. however, my code is not taking the getEmail and getId values to be displayed in the mail sent to admin. if anyone can throw some light on where i am going wrong, it would be great. here is the code:
app/code/local/Notify/Biju/etc/config.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Notify_Biju>
<version>0.1.0</version>
</Notify_Biju>
</modules>
<global>
<models>
<Notify_Biju>
<class>Notify_Biju_Model</class>
</Notify_Biju>
</models>
<template>
<email>
<newsletter_alert_template translate="label" module="n">
<label>Newsletter Alert to Admin</label>
<file>newsletter_subscription_notify.html</file>
<type>html</type>
</newsletter_alert_template>
</email>
</template>
</global>
<frontend>
<events>
<newsletter_subscriber_save_after>
<observers>
<Notify_Biju_Model_Observer>
<type>singleton</type>
<class>Notify_Biju_Model_Observer</class>
<method>newsletteralert</method>
</Notify_Biju_Model_Observer>
</observers>
</newsletter_subscriber_save_after>
</events>
</frontend>
</config>
app/code/local/Notify/Biju/Model/Observer.php
<?php
class Notify_Biju_Model_Observer {
const XML_PATH_EMAIL_TEMPLATE = 'newsletter_alert_template';
public function newsletteralert($observer){
$eventname=$observer->getEvent()->getName();
$subscriber=$observer->getEvent()->getSubscriber();
$email=$subscriber->getEmail();
$id=$subscriber->getId();
$emailtemplate=Mage::getModel('core/email_template')->loadDefault(self::XML_PATH_EMAIL_TEMPLATE);
$sender=array();
$sender['name']="admin";
$sender['email']="biju#talkingpebbles.com";
try{
$emailtemplate->sendTransactional(
self::XML_PATH_EMAIL_TEMPLATE,
$sender,
'biju#talkingpebbles.com, allen#compkraft.com', // email id of website/store admin
'admin',
array('subscirber'=>$subscriber)
);
}
catch(Mage_Core_Exception $e){
// echo $e->getMessage();
Mage::log($e->getMessage(),null,'newsletter.log');
}
}
}
app/etc/modules/Notify_Biju.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Notify_Biju>
<active>true</active>
<codePool>local</codePool>
</Notify_Biju>
</modules>
</config>
app/locale/en_US/template/email/newsletter_subscription_notify.html
<!--#subject Newsletter Subscription Alert #-->
<body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td valign="top" style="padding:20px 0 20px 0">
<!-- (header starts here) -->
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
<tr>
<td valign="top">
<h3 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"></h3>
</td>
</tr>
<tr>
<td valign="top"><h3 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;">Dear Admin </h3>
<p> Congratulations! A new subscriber has registered for Newsletter. Please login to the admin back-end to manage subscriptions.</p>
<p>Subscriber Email: {{var subscriber.getEmail()}}</p>
<p>Subscriber ID: {{var subscriber.getId()}}</p>
<br>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
You have a typo:
Search for array('subscirber'=>$subscriber).
You have "subscriber" misspelled as "subscirber"
To get the subscriber email value & id in observer,
$subscriber=$observer->getEvent()->getSubscriber() ;
$email=$subscriber->getSubscriberEmail();
$id=$subscriber->getSubscriberId();
$emailtemplate->sendTransactional(
XML_PATH_EMAIL_TEMPLATE,
Mage::getStoreConfig(XML_PATH_CONFIRM_EMAIL_IDENTITY),
'sample#xyz.in', // email id of website/store admin
'admin',
array(
'subscriber_email' => $email,
'subscriber_id' => $id
)
Then in mail - add the variables like this instead of your lines
<p>Subscriber Email: {{var subscriber_email}}</p>
<p>Subscriber ID: {{var subscriber_id}}</p>
i just try some example from http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.proxy.Rest.Here the code:
Ext.define('User', {
extend: 'Ext.data.Model',
fields: ['id', 'name', 'email'],
proxy: {
type: 'rest',
url : '/users'
}
});
var user = Ext.create('User', {name: 'Ed Spencer', email: 'ed#sencha.com'});
user.save(); //POST /users
when I create a new User instance and call save method, I get this error:
Uncaught Unable to parse the JSON returned by the server: You're trying to decode an invalid JSON String:
here the complete error warning from chrome web developer console:
Uncaught Unable to parse the JSON returned by the server: You're trying to decode an invalid JSON String: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /users</title>
</head>
<body>
<h1>Index of /users</h1>
<table><tr><th><img src="/icons/blank.gif" alt="[ICO]"></th><th>Name</th><th>Last modified</th><th>Size</th><th>Description</th></tr><tr><th colspan="5"><hr></th></tr>
<tr><td valign="top"><img src="/icons/back.gif" alt="[DIR]"></td><td>Parent Directory </td><td> </td><td align="right"> - </td><td> </td></tr>
<tr><th colspan="5"><hr></th></tr>
</table>
<address>Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80</address>
</body></html>