Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, so simply as a reference for anyone I am going to paste my support chat. Note that this chat covers a wide range of things so could be useful to have it stored here</p> <p>me: Sending to multiple recipients using code igniter? Hi there, I am a php developer using code igniter, we are using sendgrid as our email sending platform,</p> <blockquote> <p><strong>Support</strong>: Hello.<br> <hr /> <strong>me</strong>: Hi,<br> <hr /> <strong>Support</strong>: Let me see if I can find a reference in our docs.<br> <hr /> <strong>me</strong>: I believe you are going to reference: <a href="http://bit.ly/jL1Pde" rel="nofollow">http://bit.ly/jL1Pde</a><br> <hr /> <strong>Support</strong>: That was the one I was looking for. <hr /> <strong>me</strong>: Yes, I have seen that, But I also saw <a href="http://bit.ly/jvowuk" rel="nofollow">http://bit.ly/jvowuk</a> which says you should use the <em>X-SMTPAPI header</em>, so I am a bit confused as to which I should use?<br> <hr /> <strong>Support</strong>: Use the Codeigniter example from the previous link. You could use <em>X-SMTPAPI</em>, but is not needed in this case. The reason is for better portability with other languages. <hr /> <strong>me</strong>: Oh I see, Thank you very much, I have one other query. <hr /> <strong>Support</strong>: Ok.<br> <hr /> <strong>me</strong>: When sending emails is there any header we can send to associate extra information with an email (for example a id from our system) to help with the lookup?<br> <hr /> <strong>Support</strong>: You can set a custom category if needed. <em>setCategory(cat)</em> Sets a category for an e-mail to be logged as. You can use any category name you like. This is from <a href="http://bit.ly/iYjq2G" rel="nofollow">http://bit.ly/iYjq2G</a><br> <hr /> <strong>me</strong>: Oh I see, thank you, and sorry to be a pain but I have one more question,<br> <hr /> <strong>Support</strong>: Ok.<br> <hr /> <strong>me</strong>: We wish to provide our users with the ability to unsubscribe from receiving emails, All emails send through in a specific batch (e.g. 100,000 emails) will have the exact same content, with the exception that we want to append an unsubscribe message to the bottom, We want to be able to track the unsubscribe back to a specific message sent from our system, so we will want to have the url look something like <a href="http://example.com/unsubscribe/1234" rel="nofollow">http://example.com/unsubscribe/1234</a>, 1234 being the unique id for the message sent, does sendgrid provide an easy way to complete this, or must we do an individual request for every message?<br> <hr /> <strong>Support</strong>: Ok, so you can do this using: <em>addFilterSetting(filter, setting, val)</em> Adds/changes a setting for a filter. Settings specified in the header will override configured settings. Here is an example of the parameter being enabled in PHP: <em>$hdr->addFilterSetting('subscriptiontrack', 'enable', 1);</em><br> <hr /> <strong>me</strong>: ok so looking at <a href="http://bit.ly/k49a57" rel="nofollow">http://bit.ly/k49a57</a> it says about <em>your custom name to appear in the link</em>, what exactly does this mean? as we do not wish the user to be sent to sendgrid to unsubscribe.<br> <hr /> <strong>Support</strong>: So, it allows you to make the link say something different other than what we provide such as 'Remove myself from this company' for example.<br> <hr /> <strong>me</strong>: Oh I see, So if we wish the url to be something personal we must manage this ourselves, this is fine, I cant remember where, but I noticed somewhere there was something about substitutions for the email content, would this allow us to send through a list of ids and in our email body we could have *example.com/unsubscribe/--email_id--* and have it replace the *--email_id--* with the passed id?<br> <hr /> <strong>me</strong>: Ah, <a href="http://bit.ly/jvowuk" rel="nofollow">http://bit.ly/jvowuk</a> point 2 is what I was referring to, could I use that? <hr /><br> <strong>Support</strong>: Yes you could do that. <hr /> <strong>me</strong>: ah, here is a better example, <a href="http://bit.ly/lK6ltE" rel="nofollow">http://bit.ly/lK6ltE</a><br> <hr /> <strong>Support</strong>: Yes, that shows the e-mail with substitution. So, it can be modified for each.<br> <hr /> <strong>me</strong>: So, I can use *$this->email->_set_header('Custom-Header', 'value');* in code igniter to set a custom header, if I was sending out say 3000 emails, I have an array that looks like <em>array(5,6,7,8...)</em> with the ids, 3000 of them How would I send these through? (if it is not a quick answer I can work it out by looking in the <em>SmtpApiHeader</em> class)<br> <hr /> <strong>Support</strong>: The <em>SmtpApiHeader</em> is the best way. Adding them as parameters for the substitution. Each indexed ID. <hr /> session disconnected.</p> </blockquote>
 

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