小编Sim*_*sen的帖子

使用Sendgrid/Nodemailer将Angular表单数据发布到Node.js

我已按照此示例将我的Angular应用程序中的数据发布到Node.js,以将webform发布到Sendgrid.这在一些变化后工作正常,并且非常感谢快速入门.将表单数据发布到Sendgrid现在正在运行!

对于这个项目我正在使用Angular Fullstack来在我的Angular应用程序中使用Node功能.

但是,此示例只包含输入字段和textarea.我希望能够添加文件(PDF,Docx等),以便人们可以通过Sendgrid向收件人发送附件.我搜索了一个解决方案,但找不到一个有效的例子.也许是因为我不想实现的目标.

我的观点(客户):

<div ng-controller="ContactFormCtrl" id="contactformbox" style="margin-top:50px;" class="mainbox" >                    
  <div class="panel panel-info" >

          <div class="panel-heading">
              <div class="panel-title">Solliciteer direct</div>
          </div>     

          <div style="padding-top:30px" class="panel-body" >
              <form id="loginform" class="form-horizontal" role="form" name="contactform">

                  <div style="margin-bottom: 25px" class="input-group">
                    <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                    <input type="email" name="to" ng-model="email.to" ng-required="true" id="email-to" class="form-control" name="username" value="" placeholder="The emailadres from the employer">       
                  </div>

                  <div style="margin-bottom: 25px" class="input-group">
                      <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                      <input type="email" name="from" ng-model="email.from" ng-required="true" id="email-from" class="form-control" name="email-from" placeholder="Your e-mail address">
                  </div>

                  <div style="margin-bottom: 25px" …
Run Code Online (Sandbox Code Playgroud)

javascript node.js sendgrid angularjs nodemailer

13
推荐指数
1
解决办法
2160
查看次数

标签 统计

angularjs ×1

javascript ×1

node.js ×1

nodemailer ×1

sendgrid ×1