java发送邮件实现附件发送

 前端

 

<dw-content class="send_email">
  <dw-spin [dwSpinning]="loading">
    <form dw-form id="email-form">
      <label for="recipient">{
 
 { 'project-weekly-plan.email.recipient' | translate }}</label>
      <input type="text" id="recipient" name="recipient" [(ngModel)]="recipient"
             placeholder="{
 
 { 'project-weekly-plan.common.placeholder_input' | translate }} {
 
 { 'project-weekly-plan.email.recipient' | translate }}">

      <label for="carbon_copy_recipient">{
 
 { 'project-weekly-plan.email.carbon_copy_recipient' | translate }}</label>
      <input type="text" id="carbon_copy_recipient" name="carbon_copy_recipient" [(ngModel)]="carbon_copy_recipient"
             placeholder="{
 
 { 'project-weekly-plan.common.placeholder_input' | translate }} {
 
 { 'project-weekly-plan.email.carbon_copy_recipient' | translate }}">

      <label for="subject">{
 
 { 'project-weekly-plan.email.subject' | translate }}</label>
      <input type="text" id="subject" name="subject" [(ngModel)]="subject"
             placeholder="{
 
 { 'project-weekly-plan.common.placeholder_input' | translate }} {
 
 { 'project-weekly-plan.email.subject' | translate }}">

      <dw-form-item>
        <dw-form-control [dwSpan]="16">
          <dw-upload [(dwFileList)]="fileList" [dwMultiple]="false" class="uploadStyle"
                     style="display: flex;"
                     [dwBeforeUpload]="uploadFile" [dwShowUploadList]="{showRemoveIcon: true}" [dwRemove]="removeFile">
            <button class="button-style" dw-button [dwType]="'primary'">
              <span>{
 
 { 'project-weekly-plan.email.attachment' |translate }}<span
                *ngIf="fileList?.length > 0">【{
 
 { fileList.length }}】</span></span>
            </button>
          </dw-upload>
        </dw-form-control>
      </dw-form-item>
      <div id="editor-wrapper">
        <div id="toolbar-container"></div>
        <div id="editor-container"></div>
      </div>
    </form>
  </dw-spin>
  <div class="qms_drawer_footer">
    <button dw-button type="button" (click)="cancel()">
      <span>{
 
 { 'project-weekly-plan.common.btnCancel' | translate }}</span>
    </button>
    <button dw-button type="button" [dwType]="'primary'" (click)="save()">
      <span>{
 
 { 'project-weekly-plan.email.btnSubmit' | translate }}</span>
    </button>
    <button dw-button type="button" [dwType]="'primary'" (click)="send()">
      <span>{
 
 { 'project-weekly-plan.email.sendSubmit' | translate }}</span>
    </button>
  </div>
</dw-content>
import {Component, OnInit, ViewChild, ElementRef, ViewEncapsulation, Inject, Input} from '@angular/core';
import {DwDocument, DwDataTable} from '@webdpt/framework/document';
import {ProjectWeeklyPlanRepository} from '../repository/project-weekly-plan-repository';
import {APP_DATE_FORMAT, DwQueryInfo} from '@webdpt/framework';
import {DwModalRef, DwModalService} from 'ng-quicksilver/modal';
import { Observable, Subject} from 'rx
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值