NovuN
Novu15mo ago
D0808

email attachment issue in php code

i tried triggering email with an attachment with php code
$response = $novu->triggerEvent([
    'name' => 'work-with-us-email',
    'payload' => [
        'fullName' => $arrData['full_name'],
        'education' => $arrData['education'],
        'experience' => $arrData['experience'],
        'keySkills' => $arrData['key_skills'],
        'previousEmployer' => $arrData['previous_employer'],
        'position' => $jobPosition[0]['name'],
        'phoneNo' => $arrData['phone'],
        'emailName' => $arrData['email'],
        'coverLetter' => $arrData['cover_letter'],
        'url' => base_url(),
    'attachments' => [
        'file' => file_get_contents($arrEmailDetails['file_path']),
        'name' => 'resume',
        'mime' => 'application/octet-stream',
    ],
    ],
    
    'to' => [
        'subscriberId' => '670ca1e58b5274f54798ae1b',
        'email' => $careersEmailId,
    ],
])->toArray();

and it does send a successful sent message
(
    [transactionId] => 9434179b-b539-42fc-a94f-756e86db38d4
    [acknowledged] => 1
    [status] => processed
)

but mail does not get received.
this code of php i typed on my own by reference of nodejs code. there was no specific syntax for php.
can any one help me with it?
Was this page helpful?