Code Monkey home page Code Monkey logo

Comments (15)

dwightjack avatar dwightjack commented on June 12, 2024

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.

dwightjack avatar dwightjack commented on June 12, 2024

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.

SameerKhan avatar SameerKhan commented on June 12, 2024

Thanks Marco!
That worked like a charm!

from grunt-nodemailer.

ZuBB avatar ZuBB commented on June 12, 2024

@dwightjack to avoid things like this would be nice to add example with 'filePath' to readme (till migration will be done)

from grunt-nodemailer.

ZuBB avatar ZuBB commented on June 12, 2024

@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.

bobiko avatar bobiko commented on June 12, 2024

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.

ZuBB avatar ZuBB commented on June 12, 2024

@bobiko path should be filePath

from grunt-nodemailer.

bobiko avatar bobiko commented on June 12, 2024

@ZuBB I tried both versions, but I received e-mails without attachments :/

from grunt-nodemailer.

ZuBB avatar ZuBB commented on June 12, 2024

see this. possibly it will help you. I do not have other ideas. except console.log() 😉

from grunt-nodemailer.

dwightjack avatar dwightjack commented on June 12, 2024

@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.

bobiko avatar bobiko commented on June 12, 2024

@dwightjack Hey. Unfortunately, I do not get an email with attachments.

from grunt-nodemailer.

dwightjack avatar dwightjack commented on June 12, 2024

Ops, sorry...

with the current version of nodemailer shipped with this plguin you should use filePath instead of path

from grunt-nodemailer.

vijaybolleypally avatar vijaybolleypally commented on June 12, 2024

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.

silentC0der avatar silentC0der commented on June 12, 2024

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.

dwightjack avatar dwightjack commented on June 12, 2024

@silentC0der could you post the task configuration you're using?

from grunt-nodemailer.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.