Ok, so I switched the image root path from
define('SUBSCRIBE_USER_BASE_DIR', dirname(__FILE__));
to
define('SUBSCRIBE_USER_BASE_URL',plugin_dir_url(__FILE__));
and this worked.
dirname(__FILE__)
registers:
<img src="https://wordpress.stackexchange.com/var/www/html/internal/wp-content/plugins/AV_-_Subscribe_User/email/email_header.png"
Whereas the latter plugin_dir_url(__FILE__)
outputs:
<img src="http://mysite.com/wp-content/plugins/AV_-_Subscribe_User/email/email_header.png"
I’m not 100% clear as to when to use which but I’m guessing that I would use dirname when I am operating within the site server.
Related Posts:
- Include HTML template file in wp_mail
- WP mail sent to MS Exchange recipients = occasional email corruption?
- Is there a way to embed an iframe in an email with text that updates?
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- How to set SMTP programmatically
- Do something after sending email
- Mail will not send in HTML
- Create custom welcome email without a plugin
- Email sent from WordPress has HTML tags
- Reset Password – change from name and email address
- Few chars getting replaced with ‘=’ in mail content in wp_mail()
- wp_mail recipient array not sending?
- On form submission how to send 2 email to different users
- How to Configure SMTP on wordpress Cant Send Email
- How to add line breaks to $email[‘body’] when using auto_core_update_email hook
- Joining confirmation email
- How to setup SMTP for only one specific wp_mail()
- Must I change the admin user email address while changing the general email address?
- User invite email not delivered – related to subdomain?
- Can I configure WordPress to use postfix without a plugin?
- Email ‘from address’ has a www in it
- Trigger WordPress Actions from Email?
- PHP mail() works but wp_mail() does not
- WordPress unable to send mail
- Not able to send links in email after setting header
- Emailing passwords: Setup installed on home server using XAMPP
- Mail function is not working
- Send bulk emails without timeout
- What is the best way to send out thousands of emails from a WordPress site? [closed]
- Change the Sender(not From) on wp_mail() function [closed]
- Prevent sending emails on user creation in OOP context?
- HTML email sent with wp_mail shows plain text
- WordPress email could not be sent
- Getting image in mail
- Send email daily using `wp_mail`
- wp_mail() won’t send mail when it’s a variable, only when hard coded
- Send email for confirmation during user registration
- About Custom Email Template Design Responsive
- WordPress new user email formatting issues
- Email sent from WordPress has HTML tags
- wp_mail send multiple emails in a loop
- Can’t change headers / From for wp_mail()
- How can I remove the product short description from the WooCommerce Mails?
- New user notification issue
- Why do WordPress emails to multiple recipients include \n in the list
- wp_mail() not sending emails with ajax
- wordpress wp mail not changing sender mail
- Whitelist email sent by WordPress
- WP Mail isn’t sending user account messages, does send from plugins
- Asynchronous emailing
- Send email from WordPress
- Not able to override pluggable function with a mu_plugin
- What is the correct way to send multipart email in wordpress?
- Email validation in Ruby on Rails?
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
- How do I customise the new user welcome email
- How to add headers to outgoing email?
- wp_mail script with jQuery post
- Email as Username in registration
- Send a confirmation of user role upgrade conditionally
- Dynamically send pdf attached to post with contact form 7 [closed]
- wp_mail() is not working on server
- wp_mail attachment not working
- Different Webhost and using Google Mail server: Is there a better way than SMTP?
- How to validate website field in contact form 7?
- Adding second Email address for WP user notifications
- How to change WordPress email notification sender?
- Sending emptys emails every day, How stop it?
- PHP 8, AJAX mail form to function.php doesn’t work
- How do I make WordPress send an email to the user when his account gets approved (manual by me)
- Share pdf with a friend via email [closed]
- Email user on WordPress upgrade
- WordPress get_the_content losing formatting when emailed
- Retrieve duration since sign up
- wp_mail strips out the link url from the anchor tag in mail content
- Is it possible to not receive email notifications for comments?
- Changing wordpress admin email [closed]
- How to prevent the scheduling of the same event on the same day
- Resend password chosen by WP administrator? [duplicate]
- Changing old email to new email, lost the password
- Why would it take four reset password attempts to finally get the e-mail?
- Emailing system monitoring with WP
- WordPress WooCommerce email notifications going to spam folder
- Mailing issues with wordpress?
- Life after Feedburner and their email subscription
- Email Notify author of posts if content is out of date (older than 6 months)
- Remove wpautop from retrieve_password_message
- WordPress won’t let me change my administration email address
- How can I send an email to a user when a post in their category changes
- Notification Email Address not changing
- Filter wp_mail based on content type
- Custom Welcome Email | WordPress
- Sending email with wp_email and AJAX
- Contact forms not sending mails
- is_email() function Not Validating within Foreach Loop
- Garbled Code added to Email Field at ‘Quick Edit’ comment screen
- Can we validate user email changes?
- Choose from different emails for different purposes
- Admin email value stuck in database?