• Resolved mosselmansoftware

    (@mosselmansoftware)


    unable to show logo when send email. When i customize the email i just see the logo fine. how can i fix this? Our logo is top priority for our mails. Underneath you can see the visual of the email.

Viewing 10 replies - 1 through 10 (of 10 total)
  • @mosselmansoftware

    Is this a new issue with UM 2.8.2?
    How did you add the logo before UM 2.8.2?

    Plugin Support andrewshu

    (@andrewshu)

    Hi @mosselmansoftware

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

    Thread Starter mosselmansoftware

    (@mosselmansoftware)

    I ffound the problem.

    When i put <i> with source https://(imgurl) and i save it, plugin will change the sourceurl to //(imgurl) and then it wouldnt show up in the email.

    I now made a custom script in functions.php to replace outgoing email source link to add https. But this cant be the proper solution.

    adcapaust

    (@adcapaust)

    @mosselmansoftware could you please share the custom script you made? I’m having the same problem as you were.

    Thread Starter mosselmansoftware

    (@mosselmansoftware)

    Yes, of course. I will share the script when i get home in a hour.

    Thread Starter mosselmansoftware

    (@mosselmansoftware)

    Hi?@adcapaust

    You can remove the if statement in the first functions if you dont use that.

    In my case It will send a new user 2 mails, 1 from wordpress and 1 from ultimate members and I want to make sure my client will never have the ability to do that. So i just filter that email.

    add_filter('wp_mail', 'prevent_duplicate_user_notification_email');
    
    function prevent_duplicate_user_notification_email($args) {
        // Check if the email is a new user notification email with the specific subject
        if (strpos($args['subject'], '{specific subject you can remove this if statement if you want.}') !== false) {
            $args['to'] = ''; //Set adress to empty string so it wouldnt get send.
        }
    	
    	// Modify the email image urls
         $args['message'] = modify_email_image_urls($args['message']); 
    	
        return $args;
    }
    
    function modify_email_image_urls($content) {
        // This pattern matches image URLs that start with "https://"
        $pattern = '/<img[^>]+src="\K\/\/[^"]+/';
    
        // This is the callback function that prepends "https:" to the URL
        $callback = function ($matches) {
            return "https:" . $matches[0];
        };
    
        return preg_replace_callback($pattern, $callback, $content);
    }
    adcapaust

    (@adcapaust)

    @mosselmansoftware you are too kind, that has worked! I tried UM support but they were at a loss, I’m so glad I stumbled across your post here. Thank you brother!

    Thread Starter mosselmansoftware

    (@mosselmansoftware)

    No problem at all, I’m also very glad this solution worked.
    I have been testing 4 other member plugins that all didnt quite work how i wanted it.
    Then I tested ultimate members, it worked for what my client needed. But some minor issues like this are a bit frustrating.

    missveronica

    (@missveronicatv)

    @mosselmansoftware

    I have made a comment about your issue in this UM bug report

    https://github.com/ultimatemember/ultimatemember/issues/1434

    you can also use placeholder {site_url} instead of https://DOMAIN

    until the new corrected version is out

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Images not shown in send email. But i can see in email e’ is closed to new replies.