php - How to send unique message in the BCC field of the email? -


i trying establish mechanize email sent users person documented in crm system "if sender choose document email in crm."

i can instruct users copy email , drop in bcc field email sent email. can take have corn job read email/parse , add crm system.

however, there 2 thing unclear on how do.

  1. how can send unique data in email "not body"? example need know account_id, record_id related after email sent. first thought base 64 decoding json string , use in email address being bcced. not sure if works email standards.

  2. how can email server know forward email single email have read , parse email 1 email?

i have seen done in salesforce.com user can bbc , email using email this

`emailtosalesforce@v1hmxvru63wf2rqosh08jd7aw6sgv533qm0dbatsj396kjc8qad.d-ck84eae.na14.le.salesforce.com` 

the part v1hmxvru63wf2rqosh08jd7aw6sgv533qm0dbatsj396kjc8qad contains data relate email message single record in crm using account_id/ record_id values.

how can using php?

here have done far:

$a = array('account_id' => 123456789,            'record_id' => 987654321);  $to = base64_encode(json_encode($a));  $toemail = 'sentittocrm@' . $to . 'sub_domain.example.com'; 


Comments