Note that there are some explanatory texts on larger screens.

plurals
  1. POSendGrid setup trouble
    primarykey
    data
    text
    <p>I just got my SendGrid account provisioned and the zip file uploaded to my server and now I'm trying to integrate it with my Zend Framework project. I tried to integrate slowly so I would only get a few errors at a time, starting off with just creating an email before trying to send it. This is all I have so far: </p> <pre><code>require_once(BASE_PATH . "/library/sendgrid-php/SendGrid.php"); require_once(BASE_PATH . "/library/sendgrid-php/SendGrid_loader.php"); $sendgrid = new SendGrid($username, $password); $mail = new SendGrid/Mail(); $mail-&gt;addTo($email) -&gt;setSubject('Subject') -&gt;setText(''); //$sendgrid-&gt;smtp-&gt;send($mail); </code></pre> <p>By the way, the first require is in there because SendGrid loader threw an error because it couldn't find SendGrid.php. Anyway, just these few lines of code produce all of these errors:</p> <pre><code>Warning: Missing argument 1 for SendGrid::__construct(), called in ...InviteController.php on line 51 and defined in ...library/sendgrid-php/SendGrid.php on line 13 Warning: Missing argument 2 for SendGrid::__construct(), called in ...InviteController.php on line 51 and defined in ...library/sendgrid-php/SendGrid.php on line 13 Warning: mail() expects at least 3 parameters, 0 given in ...InviteController.php on line 51 Warning: Division by zero in ...InviteController.php on line 51 Fatal error: Call to a member function addTo() on a non-object in ...InviteController.php on line 52 </code></pre> <p>SendGrid's own guide, <a href="http://docs.sendgrid.com/documentation/get-started/integrate/examples/php-email-example-using-smtp/" rel="nofollow">http://docs.sendgrid.com/documentation/get-started/integrate/examples/php-email-example-using-smtp/</a>, basically just says upload the files to your server and include the loader and you're ready to go. I absolutely do not understand why I would be getting all of these errors. Did I miss a step in setting it up or something?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload