-
Notifications
You must be signed in to change notification settings - Fork 726
Open
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap
Description
I'm using SendGrid on my website and it allows a user to attach a file to an email. I used to just have the code $email->addattachment($filename) which no longer works on the new version of SendGrid. The new format is this:
$attachment = new Attachment();
$attachment->setContent("xxxx");
$attachment->setType("application/pdf");
$attachment->setFilename("balance_001.pdf");
$attachment->setDisposition("attachment");
$attachment->setContentId("Balance Sheet");
$mail->addAttachment($attachment);
My problem with that is, how am I possibly going to know what filetype the user uploads. It could be anything? Can't I just tell sendgrid to attach whatever file is uploaded to the email being sent?
Metadata
Metadata
Assignees
Labels
status: help wantedrequesting help from the communityrequesting help from the communitytype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap