Answer the question
In order to leave comments, you need to log in
How to send email in json format using phpmailer?
I'm trying to link a form on the site with Pipedrive so that user requests immediately fall into the system, and not on email requests, but Pipedrive asks me to send him letters in JSON. I can't figure out how to send an email in JSON
$mail->isSMTP();
$mail->Host = 'smtp';
$mail->SMTPAuth = true;
$mail->Username = '[email protected]';
$mail->Password = 'pass';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->FromName = 'REGISTRATION';
$mail->From = '[email protected]';
$mail->addAddress('[email protected]');
$mail->isHTML(true);
$mail->Subject = "Новая регистрация | $_POST[regemail]";
$mail->Body = '{
"item_type": "deal",
"title": "Новая регистрация",
"organization": $_POST[regcompname],
"value": 0, "currency": "USD",
"owner": "[email protected]",
"person": { "name": $_POST[regname],
"email": $_POST[regemail],
"organization": $_POST[regcompname],
"phone": $_POST[regphone] }
}';
Hi,
We are sorry, but we could not find a owner for the given object:
""
If you want this object to be added to Pipedrive system, please fill or add the "owner" field and send again.
Answer the question
In order to leave comments, you need to log in
Now I have seen everything.
There is also a normal API. What a perversion with json letter.
https://developers.pipedrive.com/v1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question