Last active
August 29, 2015 14:03
-
-
Save gabriel-dehan/a5ee2f2adf29c0a30d6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Content-Type: application/zip; charset=UTF-8; filename=3DFiles.zip Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=3DFiles.zip Content-ID: <53c3c55b3009_a923fd5090a16d03680@Gabys-Mac.local.mail> UEsDBBQAAAAIAAVv7kQZHhug338dAN0tLwAeAAAAQmVkX1NtYV9MZXR0b19M b3RvX04yMDA2MTQuM0RTdHxlWFbP8z7dJSJ2KyYWtvCcGRFFQAVBUESxFcTE FoNWukMQkW7pfs6zBxUVFBEEA0wQCxExEeO/fn4v/ud58X2h13Bf987Ozu7O zpxdWLHiie50CSkJJQkJCWn6z8Cgb9J0CYnR6lTuJ6FI/9fT0/t7JY4KEvH/ ... | |
| ... | |
| ... (base64 shit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ZipMailer < ActionMailer::Base | |
| default :from => ActionMailer::Base.smtp_settings[:user_name] | |
| def send_zip(user_name, email, zipfile_path) | |
| @user_name = user_name | |
| mail(to: email, subject: 'Your 3DFiles are ready to download') | |
| attachments['3DFiles.zip'] = File.open(zipfile_path, mode: 'rb').read | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment