Search code examples
phpmailto

Open mail client with predefined message and allow user to select address


I have a problem. I need to make a link, if user click on that link users native email client will open with predefined message, but user must be able to select receiver address. I'm aware of mailto command but I couldn't find a way to allow user to select his own receiver address. Can someone help me with this?


Solution

  • If you want to create default body copy without a default address you just ignore the address:

    <a href="mailto:?body=This is the body copy.">Send email</a>