php - How to add link in subject of email (gmail) -
is there way add link in subject of email? following example of youtube -
here in code i'm trying following still unsatisfactory result. below code sending subject printing whole anchor tag in subject.
public function contact_us($data) { $from = "from@example.com"; $to = "to@example.com"; $view = 'emails/contact_us'; $subject = "contact <a href='http://www.example.com'>link</a>"; $view_data = $data; $this->send($from,$to,$subject,$view,$view_data); }
i'm glad asked! awesome new feature , standard google supporting, part of schema.org initiative.
copying example here allows customers review directly email! block copied directly mail template.
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "restaurant", "name": "google cafe", "action": { "@type": "reviewaction", "review": { "@type": "review", "reviewrating": { "@type": "rating", "bestrating": "5", "worstrating": "1" } }, "handler": { "@type": "httpactionhandler", "url": "{{ review_url }}", "encoding": { "url": "http://schema.org/encoding/urlencoded" }, "method": "http://schema.org/httprequestmethod/post", "requiredproperty": { "@type": "property", "name": "review.reviewrating.ratingvalue" }, "optionalproperty": { "@type": "property", "name": "review.reviewbody" } } } } </script>
documentation on how activate these features can found here: https://developers.google.com/gmail/actions/
Comments
Post a Comment