title: NodeMailer - No recipients defined error
body: <p>I'm trying to send an email using Node mailer. My set up is below. The recipient comes from a Mongoose model. In the Model Rentals.createdbyemail contains the email address of the user. I've double checked to make sure the email address is contained within Rentals.createdbyemail and it is. </p>
  
  <p>For some reason when this code runs I get an error: </p>
  
  <pre><code>Error: No recipients defined
  </code></pre>
  
  <p>How would I change my code to correct this error? Thanks for any help!
  <br>
  Note: It works if I just enter an email address for the "to" field. </p>
  
  <pre><code> var smtpTrans = nodemailer.createTransport({
         service: 'Gmail',
          auth: {
              user: 'myemail@gmail.com',
              pass: 'password'
          }
        });
        var mailOptions = {
          to: Rentals.createdbyemail,
          from: 'email',
          subject: 'subject',
          text: 'This is the email content'
        };
        smtpTrans.sendMail(mailOptions, function(err) {
          console.log('email sent')
  
          if (err){
          console.log(err)
          }
        });
  </code></pre>
  
  <p>The recipient is coming from a mongoose model: </p>
  
  <pre><code>var rentalsSchema = new mongoose.Schema({
     reserved: {type: Boolean, default: false},
     createdby: String,
     createdbyemail: String,
     reservedby: String,
     reservedemail: String,
     author: {
        id:{
         type: mongoose.Schema.Types.ObjectId,
         ref: "User"
        },
         username: String,
         email: String
     },
  
  module.exports = mongoose.model("Rentals", rentalsSchema);
  </code></pre>