Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send email with attachement #107

Open
ivantnt opened this issue Sep 30, 2016 · 0 comments
Open

Send email with attachement #107

ivantnt opened this issue Sep 30, 2016 · 0 comments

Comments

@ivantnt
Copy link

ivantnt commented Sep 30, 2016

hello i'm using your very usefull extension.
I would like to send attachement to admin when a new customer make a registration
I'm trying to modify the function _sendNotificationEmail by adding a code like this
//sending file as attachment
$attachmentFilePath = Mage::getBaseDir('media'). DS . 'contacts' . DS . $fileName;
if(file_exists($attachmentFilePath)){
$fileContents = file_get_contents($attachmentFilePath);
$attachment = $mailTemplate->getMail()->createAttachment($fileContents);
$attachment->filename = $fileName;

The email is sent but the attachement always is an empty file .
Can you give me some suggestion?
Thank you very much for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant