Receive Emails: Send & trust
Forward
Forward a message to someone else. The original attachments go with it, and the email is saved in the same conversation in Sent.
https://g.sendcorex.com/v1command: forwardThe subject becomes Fwd: original and a Forwarded message block with the original email is added below your text. The forward does not pull the conversation back to Inbox.
Recipients who refused tracking on the preferences page are never tracked, even with true.
Emails sent from the mailbox carry no List-Unsubscribe header or unsubscribe link unless you send unsubscribe: true, because they are personal emails.
Everyone who receives an email from the mailbox becomes a contact in the account’s “Webmail” list and is trusted in this mailbox: their replies go to the Inbox and the address shows up in autocomplete. Senders the mailbox blocked stay blocked.
With unsubscribe: true, recipients who already unsubscribed from this mailbox are refused with RECIPIENT_UNSUBSCRIBED, and recipients lists them. Replies are never blocked.
Arguments
idstringrequiredThe
message_uidof the message to forward.tostringrequiredWho receives the forward.
to_namestringoptionalRecipient name.
ccstring[]optionalVisible copies. to + cc + bcc up to 50 addresses.
bccstring[]optionalHidden copies.
htmlstringoptionalYour text above the forwarded email. Send
htmlortext.textstringoptionalPlain text version of your note.
include_attachmentsbooleanoptionalSend the original attachments. Defaults to
true.quote_originalbooleanoptionalAdd the Forwarded message block. Defaults to
true.attachmentsobject[]optionalFiles to attach:
[{ file_name, content, content_type }],contentin base64. Up to 20 files and 25 MB in total. Every file is scanned; a dangerous one fails withFILE_BLOCKED.compose_uidstringoptionalAttachments you uploaded before with
upload_attachment.attachment_idsstring[]optionalWhich of the uploaded attachments to send. Without it, all of them.
track_opensbooleanoptionalTrack when each recipient opens the email (invisible pixel). Default
true.track_clicksbooleanoptionalTrack clicks on the links (each link goes through a redirect). Default
true.unsubscribebooleanoptionalAdd an unsubscribe link. Put
[unsubscribe]in the body (as a linkhrefor as plain text) where the link should go; without it, a default line is added at the end. Defaultfalse.
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1',
{
commands: [
{
command: "forward",
args: {
id: "Vj0xQUJDMTIz",
to: "finance@acme.com",
html: "<p>Can you check this invoice?</p>"
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "forward",
"id": "0",
"type": "SUCCESS",
"data": {
"message_uid": "Vj0xQUJDMTIz",
"thread_id": "thr_9a1c4e72",
"message_id": "5e0b9c1a-3d7f-4a21-9a6e-2f1c8d4b7e90",
"recipients": 1,
"queued": true
}
}
]
}Response fields
message_uidThe id of the forward in Sent.
recipientsHow many copies were queued (1 credit each).
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
TOKEN_EXPIREDThe access token has expired. Call Refresh Token and repeat the request.
- 401
INVALID_TOKENThe token is malformed, unknown or revoked.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + mailbox. Wait the number of seconds in Retry-After.
- CMD
RECIPIENT_UNSUBSCRIBEDOne or more recipients unsubscribed from this mailbox. `recipients` lists them: remove them or send again with `unsubscribe: false`.
- CMD
INVALID_ARGSA required argument is missing or invalid.
- CMD
NOT_FOUNDThe message, thread or folder does not exist for this token.
- CMD
INVALID_RECIPIENTThe recipient is missing or not a valid email.
- CMD
ATTACHMENTS_TOO_LARGEThe attachments of the email add up to more than 25 MB, or the mailbox already has 500 MB of uploads waiting to be sent.
- CMD
FILE_BLOCKEDA file was blocked by the security scan.
- CMD
NO_CREDITSThe account has fewer email credits than recipients (1 credit per copy).
- CMD
SENDER_NOT_FOUNDThe sender behind the token is not registered.
- CMD
INTERNALServer error. The detail is only written to the server log.