Skip to content

CORS issue #1120

@andoitz

Description

@andoitz

Hi,

I have a report on https://support.sendgrid.com/hc/en-us/requests/19947750?page=1

I am using this php repository to send emails, it was working last month but now sendgid is returing code 202 with CORS issue:

X-No-CORS-Reason: https://sendgrid.com/docs/Classroom/Basics/API/cors.html

It sends an empty response with only that in the header.

Code is real simple and should work no matter what:

$sendgrid = new \SendGrid( \Config::get('app.sendgrid.apikey') );
$email = new \SendGrid\Mail\Mail();
$email->setFrom($this->from, $this->from_name);
$email->setReplyTo($this->reply_to);
$email->setTemplateId( new \SendGrid\Mail\TemplateId($template_id) );

$response = $sendgrid->send($email);

Can you please help me figure out why this happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions