I'm trying to create a form in which the user can add (Upload) some images. After "Submit" the form should send an Email with attached files (image/images)
I'm using phpmailer for my form.
My Question: Is it possible to send the images as attachments without storing them on the Server, and send directly in Email with the attached files - I don't want to store user Documents on Server.
Thank You
The documents will have to be stored temporarly on the server if you plan on supporting sequential uploads. You could on the other side add javascript so that a user uploads all images at once and then your backend sends them via mail.
Related
Basically I would like to achieve the following result: on a web page user clicks on a Share button and it opens up his default email client with a PDF with the contents of the page attached to it.
I was think to use a combination of html2canvas and react-pdf to generate a PDF page and attach it to this email that would be opened directly from the client side. Is it something possible to implement, or would I need to do it through the server side, or is it something just generally not possible?
I found some topics about it, like this one, that state that it is only possible to add attachment from the client's machine, not the web (which includes both React client and Node.JS server that I have spinning on AWS EC2 / or something from AWS S3 bucket, I assume), however I feel like I have seen it being implemented on some sites in the past.
Ideally, in future it would be an overlay opening on Share button that would have options to open email / Slack / MS Teams client with that PDF attachment, but for now just focusing on email part.
I am trying to create a PDF with the pre-defined template with this particular library called PDFKIT. The server is written in Nodejs, may I know is there any good example I could refer to? What I want to achieve is to have a User Interface as an entry form, and then there is a pre-defined PDF file in-place on the server.When the user hits the submit button, the pdf rendering engine will pick-up the data and embedded into the pdf template file.
Take a look at the PSPDFKit for Web / PSPDFKit Server API docs for handling forms which let you retrieve and update all form fields. You can then use the document APIs for downloading a PDF with the form fields set to whatever values your user submitted.
So to recap, the steps are:
Upload the template PDF to the server storing the document id in your database or in the user's session.
Fill in the form fields using the data your user submitted.
Download the PDF with the updated form fields and e.g. email it or store it somewhere.
Alternatively you can create a signed URL so that you can directly redirect your user to the generated PDF.
Have you heard about PhantomJS? There is a package which name is phantom-html-to-pdf. You may give it a try.
I use this Gmail API request for fetching Gmail messages in user mailbox. I need to list messages from Trash as well. But in some cases message list got by list messages request is different from actual content of Trash folder content.
To reproduce the problem next steps can be performed:
Ensure that my Trash folder is empty - no messages visible in Gmail web client and API list messages request returns 0 messages in Trash.
Start creating message by pushing "COMPOSE" button in Gmail web client.
Attach file to this draft message.
Get messages list in Trash using Gmail API list messages request.
The request returns 1 new message in user Trash folder (with the file attached to draft mentioned above) however it`s not visible in Gmail web client.
Is it normal or kind of bug? Is this a problem of Gmail web client or Gmail API?
Based from this thread, when you upload a file to Gmail as an attachment, Gmail creates a temporary file to hold the data and is then sent to Trash.
So, to get a more precise search, try adding q parameter using the advanced search syntax.
See Searching for Messages to learn more.
I want to build form sending email.
As you know there is no sending email function in javascript.
But in SuiteScript there is nlapiSendEmail function.
Can I use this function in this page?
You will need to create a Service and Model file and call them from your client side code. These files are run server-side so you can use nlapiSendEmail.
I have a html file (generated via knitr package in R). It has a image which is encoded as data uri so there is no need for image attachments. Here is the link to that sample.html
http://jsfiddle.net/ebwsozav/
Sending it as an attachment, hasnt been issue but now we want to send this html to be embedded into the content of the email.
Using mutt, mutt -e "set content_type=text/html" -- person#gmail.com < sample.html.
Upon opening the email, I realised that the image couldnt be seen, though the html tables and other content could be.
Screenshot attached here
I read that gmail blocks images.
Could this the reason and is there a way to circumvent this problem ?
Update
Outlook cant view it.
Gmail in Android not able to view.
But surprise,surprise
Gmail in iOS system is able to view the image.
I read that gmail blocks images.
Partially correct. Gmail filters data URIs from being displayed in its interfaces, but it allows you to download/forward the original message (including the data URI) to a mail client that doesn't filter it. It does block (all) images on messages flagged as spam.
is there a way to circumvent this problem ?
Not exactly. You have to either use a regular URL or attach the image. It is intended for there to be no way to use data URIs in their interface.