Laravel 7 Mail attachment with excel file using Maatwebsite\Excel 3.1 - laravel

I want to attached excel file (xlsx format) in my email without saving file on the server.
I already have a working code for download.
Following is what i am trying to do and getting error.
Code
$excelFile = Excel::download(new OrderExport($this->order), 'Order-'. $this->order->id . '.xlsx');
$mail->attach($excelFile, ['as' => 'Order-'. $this->order->id . '.xlsx']);
Error
Unable to open file for reading [HTTP/1.0 200 OK
Cache-Control: public
Content-Disposition: attachment; filename=Order-4.xlsx
Date: Wed, 05 Aug 2020 13:55:24 GMT
Last-Modified: Wed, 05 Aug 2020 13:55:24 GMT]
I am using Laravel 7.x and Maatwebsite\Excel 3.1

I got it fixed with the following code
$excelFile = Excel::raw(new OrderExport($this->order), \Maatwebsite\Excel\Excel::XLSX);
$mail->attachData($excelFile, 'Order-'. $this->order->id . '.xlsx');

Related

Can anyone understand or read Microsoft anti-spam email headers?

I am setting up a small online business and have used wix.com to create a website.
I created some email triggers using the websites automations which send the emails on behalf of my email domain using ascendbywix.com.
The customer receives the email saying it is from my business email.
For all my gmail customers and yahoo customers, the email goes to their main inbox, however for hotmail/outlook customers it goes to they spam folder.
I have set up SPF/DKIM/DMARC records in my DNS host settings which I believe to be correct.
When I check the email header in hotmail, there are antispam messages I do not understand seen below.
Can anyone understand the email header output? or see anything which they believe would be the reason it is going to spam?
Received: from AM7EUR06HT029.eop-eur06.prod.protection.outlook.com
(2603:10a6:3:64::34) by HE1PR08MB2652.eurprd08.prod.outlook.com with HTTPS
via HE1PR0701CA0090.EURPRD07.PROD.OUTLOOK.COM; Thu, 4 Feb 2021 14:48:25 +0000
Received: from AM7EUR06FT016.eop-eur06.prod.protection.outlook.com
(2a01:111:e400:fc36::4a) by
AM7EUR06HT029.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::477)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Thu, 4 Feb
2021 14:48:24 +0000
Authentication-Results: spf=pass (sender IP is 147.253.213.104)
smtp.mailfrom=flyingenvelope.com; hotmail.com; dkim=pass (signature was
verified) header.d=marinovacreative.com;hotmail.com; dmarc=pass action=none
header.from=marinovacreative.com;compauth=pass reason=100
Received-SPF: Pass (protection.outlook.com: domain of flyingenvelope.com
designates 147.253.213.104 as permitted sender)
receiver=protection.outlook.com; client-ip=147.253.213.104;
helo=mta-213-104.sparkpostmail.com;
Received: from mta-213-104.sparkpostmail.com (147.253.213.104) by
AM7EUR06FT016.mail.protection.outlook.com (10.233.255.104) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.3784.11 via Frontend Transport; Thu, 4 Feb 2021 14:48:24 +0000
X-IncomingTopHeaderMarker:
OriginalChecksum:31E79B1180793E43B997CB6D7EF1B1B52634389544AD89D8DAD7AB82D7D74DE8;UpperCasedChecksum:3C98413FB694439F968C81E9D2B39B604AC8E41D9420E2878411460931DAAC96;SizeAsReceived:2542;Count:15
X-MSFBL: fEFEtwcsscncA3dachCEwwgWXQVhgeNbrzCZYObNFZo=|eyJtZXNzYWdlX2lkIjo
iNjAxYjM3MDkxYzYwMTE3YTYzNDUiLCJzdWJhY2NvdW50X2lkIjoiNTA5ODQ0Iiw
iY3VzdG9tZXJfaWQiOiIxNzc1MSIsInIiOiJjYnJ5YW50ODdAaG90bWFpbC5jb20
iLCJ0ZW5hbnRfaWQiOiJzcGMifQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=marinovacreative.com; s=sel1; t=1612450103;
i=#marinovacreative.com;
bh=b2tPAi0D6qfPEomU+dskh6Y0JGYrVSdbEPn59mXBlbY=;
h=To:Message-ID:Date:Content-Type:Subject:From;
b=NmEOTaXU6lAOYk/IBJm3AQibTi/wDFwTOkwar6TxjRBPuapbsfI2SRX03t4fFlbHb
XrVM1KV44KuwtThHSbjOP+uQiit6SsnKaIChpPzif+ROQhk8cA+rrgoBt0wq0MPMqC
SX0TX4+yrUg7f+OJIthnb+jRWj6ZW+Dnwa8YDx/w=
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flyingenvelope.com;
s=s0816; t=1612450103; i=#flyingenvelope.com;
bh=/f8yRZ6rR+GBhYC/znZWBMKO7p34rHHyKFVtc5YC5Ko=;
h=To:Message-ID:Date:Content-Type:Subject:From;
b=imerWKji+M3lzLINQSRUCZwFpvPkj5mai4Uryv+oe1tEtuP9xAFfQmTpqZeVQAaPQ
TTzhKxXBivunjjExRKgJYd7zuJOq1oXb5sFt8l7qh4W3fETafyR9GewBNHE4lOecg1
FgtmtbOsLUtKI18BL9R3XR4ASoQ5Ifl9M95bYANc=
To: "Christian Bryant" <cbryant87#hotmail.com>
Message-ID: <36.54.41297.7390C106#ax.mta1vrest.cc.prd.sparkpost>
Date: Thu, 04 Feb 2021 14:48:23 +0000
Content-Type: multipart/alternative; boundary="_----3VJ5fVkHUATxveyzQ3c1/A===_E4/54-41297-7390C106"
Reply-To: victoria#marinovacreative.com
Subject: Hi cbryant87#hotmail.com, Thanks for subscribing
List-Unsubscribe: <http://www.wix.com/my-account/contacts/unsubscribe?metaSiteId=4b16144b-e169-4171-9a46-6c18e4c5fd78&unsubscribeToken=abcefd4d5885911e7f4ea863ecce180388e169a39e4c714f1a99cb3376c2b706079a9828d30cc44ea24ddfb74302228ca2f1dd4724782f04bc77e6d64bddd2fe1c3316b7f7f52cbd4efa06f3a397c2d6445fe65559299dd1ed48d4aea7087f260ca68bbe9c65b9b4270fca4e649ed5aab4c0db65534f30d051ea50fb007265c4f6d018f43cc91fef3dbb075a41aa895846244f9ff6ff61d6c0767199793d58bd3bb4f10fca03a152f467c4d54a7c69e41be6a071ffdf09c055130f27705c87e8f600f4f603a84241a92525768f22f4a9408a1720a4aa2f96af6cca1a50e1b45c34738a6bd0585bb733e38784b6bc2a1e1f6fb8ee1b485a58f49431d782dfb47374b0798a8ae5e91226d913d75a8cc1ebd827a7576d316e2fe8b0a5019930ec9b41e8c3f6ab40538468cb23542e8104e50d36be2cb7f67a37bab589ca38152cf303c72d9665beb836b971162db9e4966e32443ca4808a575209093ec5392f4dc9df1aee9a6ace2926379566c81e2650d7>
From: "Marinova Creative" <victoria#marinovacreative.com>
x-abuse-id: 4b16144b-e169-4171-9a46-6c18e4c5fd78
Precedence: Bulk
Feedback-ID: 4b16144b-e169-4171-9a46-6c18e4c5fd78:7d6215dd-232d-4717-b832-03ecfcc678e9:wixshoutout
X-IncomingHeaderCount: 15
Return-Path: msprvs1=18669bbscyjXS=bounces-17751-509844#flyingenvelope.com
X-MS-Exchange-Organization-ExpirationStartTime: 04 Feb 2021 14:48:24.8733
(UTC)
X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit
X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000
X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit
X-MS-Exchange-Organization-Network-Message-Id:
227b975f-9433-4880-30b3-08d8c91bece6
X-EOPAttributedMessage: 0
X-EOPTenantAttributedMessage: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa:0
X-MS-Exchange-Organization-MessageDirectionality: Incoming
X-MS-PublicTrafficType: Email
X-MS-Exchange-Organization-AuthSource:
AM7EUR06FT016.eop-eur06.prod.protection.outlook.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-UserLastLogonTime: 2/4/2021 2:44:48 PM
X-MS-Office365-Filtering-Correlation-Id: 227b975f-9433-4880-30b3-08d8c91bece6
X-MS-TrafficTypeDiagnostic: AM7EUR06HT029:
X-MS-Exchange-EOPDirect: true
X-Sender-IP: 147.253.213.104
X-SID-PRA: VICTORIA#MARINOVACREATIVE.COM
X-SID-Result: PASS
X-MS-Exchange-Organization-PCL: 2
X-MS-Exchange-Organization-SCL: 0
X-Microsoft-Antispam: BCL:2;
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Feb 2021 14:48:24.2637
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 227b975f-9433-4880-30b3-08d8c91bece6
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource:
AM7EUR06FT016.eop-eur06.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg:
00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT029
X-MS-Exchange-Transport-EndToEndLatency: 00:00:01.1211273
X-MS-Exchange-Processed-By-BccFoldering: 15.20.3805.024
X-Microsoft-Antispam-Mailbox-Delivery:
abwl:0;wl:0;pcwl:0;kl:0;iwl:0;dwl:0;dkl:0;rwl:0;ucf:0;jmr:0;ex:0;auth:1;dest:J;OFR:SpamFilterAuthJ;ENG:(5062000282)(90000117)(91040095)(9000001)(9015001)(9050020)(9060021)(9100273)(5061607266)(5061608174)(4900115)(98391011)(4920090)(6394003)(4950131)(4990090)(9140004);RF:JunkEmail;
X-Message-Info:
qoGN4b5S4yqNFxkPKm3EVQuKR9OsRjZyTthWWLx7sBMj1tH5R4lH6bGmJFB22p2xfSNNCtql0WJwQuOcW0KqlZhVmLsPlLNvSC+DQIXl+SnNIm2GPLt8roydd+mk4wFjxFCWMIFLLO8kGZXye8wEZUSOOVSVVxODjb2NyMI0n7hfzmPJj7STSTf2zjt8ylta82feYR3uUDTm82bgU0b2HA==
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MjtHRD0xO1NDTD02
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?ZDVoMWxKMUdoNjFrWWtxRUNvME85eFBaT0tQUWlzaDhDOFNKcS80V3NSVWJV?=
=?utf-8?B?NjRjRUxVYktXVzRVQXlkUmM4TGdKYi9Cb2VMUW41WHYwVlRzdm56SXpDSlky?=
=?utf-8?B?Z0x1YVl1ajVkZ2djNUx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1MG9rb0c5WVU4UlJwUTNFeUlkZ2NhQ3Vx?=
=?utf-8?B?bHBqS0tna2J2bE4wL2d1bnJUWEtobmRnM0d1USsvQ3BNbmNkYURIeWtmYVNw?=
=?utf-8?Q?lTQ+dgBsl+NuyESlmtpkyfRKY0QX84=3D?=
MIME-Version: 1.0
The X-Microsoft-Antispam: BCL:2; is partly documented here:
https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/bulk-complaint-level-values?view=o365-worldwide
Most mailbox providers don't tell you too much about how their mail filtering works, for obvious reasons.
Your MAIL FROM is the provider's default. You may be able to customise the "bounce domain" which can improve reputation, by "aligning" the envelope FROM (=Return-Path, Bounce Domain, RFC5321 FROM), and "Header" FROM (RFC5322).
https://www.sparkpost.com/docs/tech-resources/custom-bounce-domain/
For meanings of the various FROM addresses etc:
https://www.sparkpost.com/blog/dmarc-howto/
The address 147.253.213.104 is your "delivery" IP address. You can check the reputation of this on various free tools, including
https://talosintelligence.com/reputation_center/lookup?search=147.253.213.104
and
https://mxtoolbox.com/blacklists.aspx

Returning custom body with HTTP status error

I have a strange problem, I am testing on two different servers,
first server with a basic apache
second server with Zend Server
What I am trying to do it's to call an url on that server with cURL, this url can return one of the following codes: 200, 406 with a json body containing a message.
When querying the Apache server, on 406 error, I get this:
< HTTP/1.1 100 Continue
< HTTP/1.1 406 Not Acceptable
< Date: Wed, 10 Dec 2014 11:16:01 GMT
< Server: Apache/2.4.10 (Ubuntu)
< Content-Length: 75
< Content-Type: application/json
* HTTP error before end of send, stop sending
<
{"status":406,"message":"Domain not found (is the file named correctly ?)"}* Closing connection 0
And when querying the Zend Server, I get this:
< HTTP/1.1 100 Continue
< HTTP/1.1 406 Not Acceptable
< Date: Wed, 10 Dec 2014 11:15:05 GMT
< Connection: Keep-Alive
< Content-Type: text/html; charset=iso-8859-1
< Content-Length: 261
* HTTP error before end of send, stop sending
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /webservice could not be found on this server.</p>
</body></html>
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
The header type is changed to text/html from application/json, and the body is a plain html error page.
Is this a Zend server issue ?
I dont think it is an issue with either server. The error code returned by both the servers is 406 but the error message in the http response body is sent as json in apache and html in zend server, hence the different content-types.
The two servers have chosen to send the error message in different formats hence the diffent content-types.

Dropbox search method fails to search

I am using "dropbox-sdk" gem to upload the files in DropBox account. I used the following method to search.
require "dropbox_sdk"
client = DropboxClient.new("ACCESS_TOKEN")
client.search("/", "myfile.ipa")
=> [{"rev"=>"86009",
"thumb_exists"=>false,
"path"=>"/App/myfile.ipa",
"is_dir"=>false,
"client_mtime"=>"Mon, 08 Sep 2014 18:59:17 +0000",
"icon"=>"page_white",
"bytes"=>5050139,
"modified"=>"Tue, 09 Sep 2014 17:55:05 +0000",
"size"=>"4.8 MB",
"root"=>"dropbox",
"mime_type"=>"application/octet-stream",
"revision"=>79144}]
client.search("/", "myfile.ipa")
=> []
i was able to get the response at first time. If i again search with the same file name, it returns with the empty response.
Any idea?

How do I view the response cookies from a HTTParty get request?

I'm using httparty to do a GET request to a certain website. I need the response cookies in order to successfully make a POST request to login.
rest_client makes it really easy, all I have to do is:
get_request = RestClient.get('<REDACTED>')
response_cookies = get_request.cookies
# =>
{
"sessiontype"=>"mpb",
"aac"=>"741F9EC20A4C422369F7564445611591",
"Expires"=>"Sun",
"Path"=>"%2F",
"Domain"=>"<REDACTED>",
"internetbankierenmi"=>"1559079104.20480.0000",
"TSdb640d"=>"d17ca2538ee2215b647c3466d4b06da7ec33c7a21dc7217953d3ffe7d4efbe89959deba9debace3f579e71c9e27e0b6b1ea2c663"
}
But I want to do the same with httparty. So my question is how do I view/access the response cookies from a GET request in httparty?
Since cookies are part of the response header, you can access them from the response header in httparty.
require 'httparty'
r = HTTParty.get('<REDACTED>')
r.headers
# => {"date"=>["Sat, 26 Jul 2014 19:34:09 GMT"], "cache-control"=>["no-cache", "no-store"], "pragma"=>["no-cache"], "expires"=>["Thu, 01 Jan 1970 00:00:00 GMT"], "content-length"=>["13987"], "set-cookie"=>["sessiontype=mpb; Secure", "aac=742A83A50A4C422C24D6F952C4BF6355; Expires=Sun, 26 Jul 2015 19:34:08 GMT; Path=/; Domain=<REDACTED>; Secure", "internetbankierenmi=1777182912.20480.0000; path=/", "TSdb640d=de34831032c17e8b66f123633372a9b341a9773368fccca553d402b1d4efbe89959deba9debace3fe0d47c86e27e0b6b1669bf05; Path=/"], "vary"=>["Accept-Encoding,User-Agent"], "content-type"=>["text/html;charset=ISO-8859-1"], "content-language"=>["en"], "connection"=>["close"], "strict-transport-security"=>["max-age=8640000"]}
r.headers['set-cookie']
# => "sessiontype=mpb; Secure, aac=742A83A50A4C422C24D6F952C4BF6355; Expires=Sun, 26 Jul 2015 19:34:08 GMT; Path=/; Domain=.ing.nl; Secure, internetbankierenmi=1777182912.20480.0000; path=/, TSdb640d=de34831032c17e8b66f123633372a9b341a9773368fccca553d402b1d4efbe89959deba9debace3fe0d47c86e27e0b6b1669bf05; Path=/"

Why I'm getting a 500 server response in Google Webmaster Tools?

I'm trying to figure out why my web isn't getting crawled by the Google Spider, and when I do a test about the response of the site I see that I'm getting a 500 server response BUT my website is actually working.
My site is http://lacasadelilihostal.com/ and was made in Laravel.
I see another question when said that the problem could be by a JavaScript error but I don't see anyone in my web; and also I changed the permissions of the public folder to 775 but didn't work either.
This is the exact header response of your homepage. I'm taking a little time to digest this information and will come back. In the meantime others can consider this info too:
HTTP/1.1 200 OK
Date: Thu, 15 Aug 2013 17:35:33 GMT
Server: Apache
X-Powered-By: PHP/5.3.26
Cache-Control: no-cache
Set-Cookie: laravel_session=76c6f66056ff1828be5ad677b87f9690; expires=Thu, 15-Aug-2013 19:35:33 GMT; path=/; HttpOnly
Set-Cookie: laravel_session=76c6f66056ff1828be5ad677b87f9690; expires=Thu, 15-Aug-2013 19:35:34 GMT; path=/; httponly
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
I check my logs and found that i'm getting the error "'Uninitialized string offset: " in this line:
`$langcode = (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : '';
$langcode = (!empty($langcode)) ? explode(";", $langcode) : $langcode;
$langcode = (!empty($langcode['0'])) ? explode(",", $langcode['0']) : $langcode;
$langcode = (!empty($langcode['0'])) ? explode("-", $langcode['0']) : $langcode;
$langcode = strtolower($langcode[0]);` `
This only happened with crawlers... I remove the last line.

Resources