cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Send image by mail

Hi,

 

I want to generate Matrix code using Following API : 

 

http://datamatrix.kaywa.com/img.php?s=8&d=458

 

Then send by mail to user. 

I can display the image on power App:

 

 

Set(ImgQR;"http://datamatrix.kaywa.com/img.php?s=8&d=458");;

 

Then I create a new item 'image' with value 'ImgQR' and i see the images I want.

 

The problem come when I want to send the image by mail

 

 

 

ClearCollect(ImageQR;{Name: "QRcode.jpg"; ContentBytes: ImgQR; '@odata.type':""});;
Office365Outlook.SendEmail(
    User().Email;
    "mailpower";
    "ok";
    {
        Attachments: ImageQR;
        IsHtml: true
    }
);;

 

 

I got an error message, Something like "Something went wrong  please check your internet connexion"

 

Could it be because the API is http and not https?

 

The thing is , I can send image well when i'm using another APi (https://chart.googleapis.com/chart?cht=qr&chl=458&chs=100x100 but this one generate QR code not data matrix).

 

I think my problem is coming from API. To solve it, I think I should be able to save image as a real image or byte content then send it by mail… but i dont know how to do this

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

The attachment only support Blob files, since your image is from the API, so it is only a hyperlink, I suggest you embed the QR in HTML body, please try this:

Office365Outlook.SendEmailV2(
    "ABC@microsoft.com",
    "Subject",
    "Email Body.<img src=""http://datamatrix.kaywa.com/img.php?s=8&d=458"" alt=""Testing"" width=""100"" height=""100"">"
)

Snipaste_2020-05-22_17-54-55.png

Hope this helps.

Sik

View solution in original post

1 REPLY 1
v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

The attachment only support Blob files, since your image is from the API, so it is only a hyperlink, I suggest you embed the QR in HTML body, please try this:

Office365Outlook.SendEmailV2(
    "ABC@microsoft.com",
    "Subject",
    "Email Body.<img src=""http://datamatrix.kaywa.com/img.php?s=8&d=458"" alt=""Testing"" width=""100"" height=""100"">"
)

Snipaste_2020-05-22_17-54-55.png

Hope this helps.

Sik

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,690)