Comments (15)
Hi,
it could be an issue in nodemailer's docs. By changing path
with filePath
everything seems to work fine.
I've opened an issue on their repo, so that you may refer to that for additional support.
from grunt-nodemailer.
Hi,
seems like related to v1.0 changes in nodemailer. Udating the plugin will take some fixes and changes, in the meanwhile just use filePath
from grunt-nodemailer.
Thanks Marco!
That worked like a charm!
from grunt-nodemailer.
@dwightjack to avoid things like this would be nice to add example with 'filePath' to readme (till migration will be done)
from grunt-nodemailer.
@SameerKhan, do you use static/'hardcoded' path for attachment or dynamic one?
under static I mean same stuff as in your example above eg
attachments : [
{ // file on disk as an attachment
filename: 'samtest.txt',
path: 'samtest.txt' // stream this file // <----- static path to file
},
],
from grunt-nodemailer.
Hey,
I have the same problem and I can not understand what the problem is. I have the latest version of nodemailer and grunt-nodemailer.
I copied the example from the https://github.com/andris9/Nodemailer and emails come with attachments.
But when I send using grunt-nodemailer unfortunately attachments do not arrive with the mail. All of the code is based on https://github.com/dwightjack/grunt-email-boilerplate
example code from gruntfile:https://gist.github.com/bobiko/f9c3535582622f8bf976
from grunt-nodemailer.
@bobiko path
should be filePath
from grunt-nodemailer.
@ZuBB I tried both versions, but I received e-mails without attachments :/
from grunt-nodemailer.
see this. possibly it will help you. I do not have other ideas. except console.log()
from grunt-nodemailer.
@bobiko in the gist you linked you've set attachments
as an object, but it should be an array of objects:
attachments:
[{
filename: 'image.gif',
path : '/home/vagrant/mailer/image.gif',
contentType: 'multipart/mixed'
}],
from grunt-nodemailer.
@dwightjack Hey. Unfortunately, I do not get an email with attachments.
from grunt-nodemailer.
Ops, sorry...
with the current version of nodemailer shipped with this plguin you should use filePath
instead of path
from grunt-nodemailer.
Hay attachments are coming properly the only thing needed is add attachments section in message block
FYI: nodemailer: {
options: {
transport: {
type: 'SMTP',
options: {
service: 'Gmail',
auth: {
user: 'a*****.co.in',
pass: '**_'
}
}
},
message: {
subject: 'A test e-mail1',
text: 'Plain text message',
html: '
HTML custom message
',attachments:
[{
filename: 'my-report.html',
filePath : 'ttte/target/screenshots/my-report.html',
contentType: 'multipart/mixed'
}]
},
recipients: [
{
email: 'a_*.com',
name: 'ADV'
}
]
},
inline: { /* use above options*/ }
and don't forgot to add grunt.loadNpmTasks('grunt-nodemailer');
from grunt-nodemailer.
Hi , Using the same but getting a attached mail but content lost .Actually i tried to attached excel in mail.
any suggestion.
Thanks
from grunt-nodemailer.
@silentC0der could you post the task configuration you're using?
from grunt-nodemailer.
Related Issues (15)
- Fatal error when trying to send html email HOT 2
- Invalid external files should fail gracefully HOT 2
- Image attachment has no data HOT 2
- Using "sendmail" transport resulting in "spawn sendmail ENOENT" error HOT 1
- False positive when running nodemailer grunt task
- Doesn't work with Sendgrid transport
- Fatal error: Error occured: connect ECONNREFUSED 127.0.0.1:25 HOT 9
- Can't configure for Office365
- Display error name instead of error message HOT 1
- Updating nodemailer to v1.0+ HOT 1
- Attachment is not sent, unless value of 'filePath' key is hardcoded. HOT 3
- Fatal error: Error occured: spawn ENOENT HOT 1
- Overwrite subject? HOT 1
- Could you please give a very simple example? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-nodemailer.