Hi, I have a form which includes image field. There is also an email script in hook that sends an email with some of the field data when this form is submitted. If user attach the image in the form, is there a way to include the image/attachment in the email?
Thanks.
Email Attachment
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Email Attachment
Any news about this topic?
Re: Email Attachment
Hi,
I would suggest looking into AG genereated code. In incFunctions.php you find the sendmail function which essentially uses phpmailer ( https://github.com/PHPMailer/PHPMailer ). Probably it's the easiest to check the sendmail code, copy and adjust it into your own function and add the option to give attachments on the way.
Please see the docs in the mentioned URL.
Olaf
I would suggest looking into AG genereated code. In incFunctions.php you find the sendmail function which essentially uses phpmailer ( https://github.com/PHPMailer/PHPMailer ). Probably it's the easiest to check the sendmail code, copy and adjust it into your own function and add the option to give attachments on the way.
Please see the docs in the mentioned URL.
Olaf
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view