Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PDF sent to email via PHP?

Featured Replies

I've got a few PDFs that have a field for inputting an email address and submitting. What I want the submit button to do is submit a copy of the page to the users email address without using an email client, and from what I've found I need to get the submit to send to a php file that automates this.

 

Can someone help with the code for the PHP file? I've found this code to upload a file but can this be used to send an existing file on a server to an email address submitted? or can someone recommend something else??

 

Thanks

 

<form method="post" enctype="multipart/form-data"><input type="file" name="yourForm"><input type="submit" value="Upload and send"></form>

---other script (sorry its php...thats all i ever do scripting in because asp sucks)---

<?php
...
$mail = new PHPMailer(); //google this if you want
...general email stuff...
$mail->addattachment($_FILES['yourForm']['tmp_name'], $_FILES['yourForm']['name']);
$mail->send();
...
?>

the best way to send a pdf is to send a link to the pdf which is uploaded on to the server, sending attachments is a headache, they get blocked in some clients marked as spam in others dont get there sometimes.

  • 2 weeks later...
  • Author

I worked this out by using a Flash file that sent an email to a server and attached the required page(s).

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.