Giter Site home page Giter Site logo

Comments (11)

putupadang avatar putupadang commented on September 28, 2024 7

Change

<img src="data:image/png;base64, {{ base64_encode($qr) }} ">

to

<img src="{!!$message->embedData($qr, 'QrCode.png', 'image/png')!!}">

I just tested this and it works in gmail/inbox. Please let me know if you have any other issues!

what thats mean the $message variable ?

from simple-qrcode.

SimplyCorey avatar SimplyCorey commented on September 28, 2024 3

Change

<img src="data:image/png;base64, {{ base64_encode($qr) }} ">

to

<img src="{!!$message->embedData($qr, 'QrCode.png', 'image/png')!!}">

I just tested this and it works in gmail/inbox. Please let me know if you have any other issues!

from simple-qrcode.

SimplyCorey avatar SimplyCorey commented on September 28, 2024

Can I see your emails.product_redeem template please?

from simple-qrcode.

mikt avatar mikt commented on September 28, 2024

Sure, thank you:

<!DOCTYPE html>
<html>
<head>
    <title>Prospector theater</title>

</head>

<body>
<h3>Hello {{ $account->first_name }} {{ $account->last_name }},</h3>

<p>This email serves as a ticket for a free {{ $product->product->name }}. <br />
    Please bring a printed version of this email with you in order to redeem it on-site.</p>
@if (isset($product->expires))
    <p>Keep in mind that this ticket is only valid till {{ $product->expires }}</p>
@endif

<br />
<br />
<br />
<img src="data:image/png;base64, {{ base64_encode($qr) }} ">
{{--{!! $qr !!}--}}

<p>Thank you,</p>
<br />
<p>Prospector theater</p>
</body>
</html>

from simple-qrcode.

plcosta avatar plcosta commented on September 28, 2024

@SimplyCorey It works fine for me. Thanks!

from simple-qrcode.

SimplyCorey avatar SimplyCorey commented on September 28, 2024

Added to readme.

from simple-qrcode.

revroad-dev avatar revroad-dev commented on September 28, 2024

This still doesn't work for me. Copied it exactly as is. I get a empty <img> tag in gmail. Has something changed?

from simple-qrcode.

SimplyCorey avatar SimplyCorey commented on September 28, 2024

@revroad-dev It's possible that gmail has changed something on their end. Can you paste an example of a raw email in here please?

from simple-qrcode.

crassclown avatar crassclown commented on September 28, 2024

@revroad-dev It's possible that gmail has changed something on their end. Can you paste an example of a raw email in here please?

I get an empty <img> tag as well

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Email</title>
</head>
<body>
    <p>
        Dear, {{ $karyawan->nama }}
        <br><br>
        Berikut QR Code yang bisa anda gunakan untuk absensi:<br>
        <img src="{!!$message->embedData(QrCode::format('svg')->generate($karyawan->id_karyawan), 'QrCode.svg', 'image/svg+xml')!!}">
    </p>
</body>
</html>

from simple-qrcode.

PoojaJadav avatar PoojaJadav commented on September 28, 2024
<img src="{!!$message->embedData($qr, 'QrCode.png', 'image/png')!!}">

What is the $message here?

from simple-qrcode.

muarachmann avatar muarachmann commented on September 28, 2024
<img src="{!!$message->embedData($qr, 'QrCode.png', 'image/png')!!}">

What is the $message here?

If you use laravel https://laravel.com/docs/8.x/mail#inline-attachments

from simple-qrcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.