Alisson Acioli
CDCloudflare Developers
•Created by SageSphinx63920 on 2/28/2024 in #workers-help
Email workers send email
Buffer.from(message.raw).toString();
38 replies
CDCloudflare Developers
•Created by SageSphinx63920 on 2/28/2024 in #workers-help
Email workers send email
try 2 code
38 replies
CDCloudflare Developers
•Created by SageSphinx63920 on 2/28/2024 in #workers-help
Email workers send email
In theory, one of the two would have to work.
38 replies
CDCloudflare Developers
•Created by SageSphinx63920 on 2/28/2024 in #workers-help
Email workers send email
Try again:
msg.addMessage({
contentType: 'text/plain',
data: message.raw.replace(/\n/g, '\r\n')
});
If it goes wrong, try:
msg.addMessage({
contentType: 'text/plain',
data: 'Testing'
});
38 replies
CDCloudflare Developers
•Created by SageSphinx63920 on 2/28/2024 in #workers-help
Email workers send email
Try change:
msg.addMessage({
contentType: 'text/plain',
data:
${ message.raw }
});
to:
msg.addMessage({
contentType: 'text/plain',
data: ${message.raw}
.replace(/\n/g, '\r\n')
});
From the error you indicated, it seems to be something referring to a final line that is being received and could not. Also try to check the text you are sending. If the solution above doesn't work, try adding a direct text to test as data in "data": testing...
38 replies