Suppose I have a file image.php which will generate me some image. How do I put the generated image into an attachment?
Simply attaching image.php doesn't work, it gives email with an empty image.