How to link to email account?

I have tried both of these lines but none of them works:

html.A([html.H6(‘Feedback’)], title=‘email me’, href=[‘mailto:example@gmailcom’] , target=‘_blank’)


dcc.Link([html.H6(‘Feedback’)], title=‘email me’, href=[‘mailto:example@gmailcom’] , target=‘_blank’)

Plus, how can I put this link to the far right side of the page like what it’s very common:


The href argument needs to be a string, it looks like you are trying to use it as markdown? Python will read that as a list.

As far as to the right, there are a couple of ways to do this. Pass the style {'float':'right'} or {'position':'absolute', 'bottom':'0px', 'right':'0px'}

All together:

dcc.Link([html.H6('Feedback')], title ='email_me', href='mailto:example@gmailcom',
                     target ='_blank', style={'float':'right'})
1 Like

thanks for the style it works great, but href part still not working
when I click the link it just refresh the page or in another word try to go out of
the page in return back!!

any other ideas?

Try taking the “target” out, I don’t think it is necessary for a mailto: and might be causing your issues.

Also, I don’t know how your browser is configured to handle mailto links.

1 Like

thanks, after bunch of trials I end up with this one worked for me

html.A([html.H6('Feedback')], title ='email_me', href='', target='_blank')