发送二维码给ion 3发送电子邮件

时间:2018-05-11 11:13:51

标签: angular ionic-framework ionic3 ionic-view

可能会将QR码发送到离子3中的电子邮件吗?我无法将我的二维码发送到电子邮件,并显示“无法附加文件”。

这是我在html中的代码

 <ion-card *ngIf="createdCode">
      <ngx-qrcode *ngIf="createdCode" [qrc-value]="createdCode"></ngx-qrcode>
      <ion-card-content>
        <p>Value: {{createdCode}}</p>
      </ion-card-content>
      <button ion-button (click)="sendEmail()">Send Email</button>
  </ion-card>

和我的.ts文件

sendEmail(){

        this.createdCode.then(ImageData);

        let email = {
            to: '',
            cc: '',
            attachments: [
                this.createdCode
            ],
            subject: 'New QR code',
            body:'this is new qrcode for student <br><br>',
            isHtml: true
        };

        this.emailComposer.open(email);
    }

0 个答案:

没有答案
相关问题