You can’t attach from a URL. So https://ucarecdn.com/8aa17c61-bd55-4311-8b45-7d9a2efde6c5/
won’t work.
You need an absolute path to the file, such as /path/to/my/file.ext
.
But there are some other problems with your code snippet as well. You use $email_attachement
(with a ..chement…) in one place, but then $email_attachment
in your wp_mail()
call. Also, your “attachment” isn’t a file. While that may resolve as a URL, that would involve a URL rewrite which isn’t going to work for accessing a file to attach.
Related Posts:
- How to create a CSV on the fly and send as an attachment using wp_mail?
- wp_mail not sending attachment
- Attach pdf from dynamic url
- wp_mail attachment not working in wordpress
- Adding attachment file name to email link
- How to allow specific extensions and file size to wp_mail attachment?
- Post Via Email – How to send Attachments with it (e.g. PDF File or JPEG Image)?
- Email Attachment from Form Submit
- Auto create file and send it via wp_mail()
- Could not get attachment using wp_mail
- wp_mail Allow Remote Attachments from CDN
- Send data URL string as an attachment in wp_email
- wp_mail doen’t send mails whit attachment
- How to manage attachment relationships for specific posts in WP 3.5+
- Change attachment filename
- Getting a taxonomy’s thumbnail url
- Check if post has attachments (not image)
- Expanding new Media Uploader in WordPress 3.5
- Applying automatic link class to images embedded to posts
- How to get attachment caption (get_the_excerpt gives parent post excerpt) ?
- How to single click to download image in single post
- delete attachment from front end
- custom fields for attachments?
- URL rewrite with add_rewrite_rule and attachment_id
- How to set author for post AND post attachments
- Get attachment from post
- Add column for attachment file size
- Change image link: wp_get_attachment_link
- Multi-line captions on attachments
- Gel all image from certain post type
- ID of images from gallery
- wp_get_attachment_image_src always returns false
- Exact image sizes
- Get the size (size in Kb or MB) of an featured image?
- Get attachment file link
- wp_insert_post featured image from library
- Mail not sent when I set HTML headers
- the_content() behavior on attachment.php versus single.php
- attachments with tags and get_posts
- Hide “Gallery Settings” and “Insert into Post” button from Attachment window
- How can I change wordpress attachment url and protect it?
- Adding class to next/prev image link in attachment.php
- Getting ID from ajax response of async-upload.php
- How to add multiple checkbox elements to media attachments?
- Get attachment next and previous by author only
- Edit default image attachment size
- Perform a custom (bulk) action in media view
- Strip the folder path away from wp_get_attachment_url to show filename only
- Trigger WordPress Actions from Email?
- woocommerce_email_attachments filter arguments [closed]
- Need to get array of images ID attached to post
- How to set a conditional statement for $attachment->post_excerpt, to check for value?
- Get the bare URL for an attachment
- How to check if there is image title, caption, description?
- Display random gallery images and its parent post title leading to parent post permalink
- How to remove attachments size attribute [duplicate]
- How to retrieve the sender email with wp_mail()?
- wp_mail() headers multipart/alternative
- How do I get all attachments that are used in the current post, not just the children?
- wp_mail 200 response but no mail sent
- Emailing passwords: Setup installed on home server using XAMPP
- wp_mail file attachment not being placed in upload folder?
- Mail function is not working
- Is there a move_attachment_file() function in wordpress?
- How do you create an attachment ID with Ajax submit? No page refresh
- Create page from post attachments
- how to get random media id from media gallery
- Change the Sender(not From) on wp_mail() function [closed]
- How to get $attachment->ID in custom functions
- All attachment pages give 404
- wp_mail() won’t send mail when it’s a variable, only when hard coded
- Unable to get wp_get_attachment_url to show
- Get Attachment Image Class by attachment id
- Automatically deactivate link for attachments
- Send email for confirmation during user registration
- Hiding or removing file extension displayed in HTML on attachment page
- After changing permalink structure, How to redirect attachment url to old parent post url
- Getting attachment post using wp_get_attachment_link
- Were attachment media settings removed from WordPress?
- How to identify and delete all the images/pdf’s which are not assigned to any post/custom-post/page and also which are repeated
- New user notification issue
- Filter not applied to all image sizes
- Zip a file and add as attachment
- Why do WordPress emails to multiple recipients include \n in the list
- Remove post with attachments hook
- Setting an image as post header (not featured image)
- PHPMailer – Uploading a file
- Whitelist email sent by WordPress
- How to restrict users to only access their own media files in wordpress
- When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?
- Sending SMTP mail using a server with self-signed SSL
- List attachments of a page
- Send email from WordPress
- Importing Attachments with No Extension
- Is there a way to add Reattach and Unattach links in image gallery?
- Post images not displaying as attachments
- Showing the attachment for a page?
- Calling a javascript function in post edit page after attaching something to post
- Custom Fields, Media uploader, Attachments
- Media library upload hook