user3213028
user3213028

Reputation: 27

How do you properly send an attachment with Google App Engine using PHP? Especially PDF

For the life of me, I can't seem to figure this out:

https://developers.google.com/appengine/docs/php/mail/#PHP_Sending_mail_with_attachments

When you scroll down to the part about adding an attachment it asked for

'image.jpg', 'image data', $image_content_id

What do they mean by 'Image Data' & 'Image_content_id'?

Any help would be appreciated!

Upvotes: 0

Views: 116

Answers (1)

Evan
Evan

Reputation: 236

It is better to look at their source code to get more information.

   * @param string $filename Filename of the attachment.
   * @param mixed $data File data of the attachment.
   * @param string $content_id Optional Content-ID header value of the
   * attachment. Must be enclosed by angle brackets (<>).

You can leave the Image_content_id empty.

Here is the URL of their newest version:

https://chromium.googlesource.com/external/googleappengine/python/+/f72f48321d631feac45cdbbb6cb82587fe2f6f1d/php/sdk/google/appengine/api/mail/BaseMessage.php

Upvotes: 1

Related Questions