locked
Custom font not working in MailMessage RRS feed

  • Question

  • User969992919 posted

    Hi,

    I am trying to send below body using MailMessage and the IsBodyHtml is working fine but I am not getting the expected font.

    Where is the problem here?

    body = "<html dir='rtl' lang='ar'>";
    body += "<head>";
    body += "<meta charset='UTF-8'>";
    body += "<meta name='viewport' content='width=device-width, initial-scale=1.0'>";
    body += "<link href='https://fonts.googleapis.com/css?family=Changa&amp;subset=arabic' rel='stylesheet' />";
    body += "</head>";
    body += "<body dir='rtl' lang='ar' style='font-family: Changa'>";
    body += "<h1 style='font-family: Changa'>السلام عليكم " + App.getUserInfo("JafariaUserFirstName") + "</h1>";
    body += "تم استلام الحجز التالي وسيتم الاتصال بكم لتأكيد الحجز:<br /><br />";
    body += "<br /><br />";
    body += "شكرا<br />";
    body += "<br /><br />";
    dubai.com</a>";
    body += "</body>";
    body += "</html>";
    

    Thanks,

    Jassim

    Tuesday, July 24, 2018 2:55 AM

All replies

  • User753101303 posted

    Hi,

    Which mail client are you using ? AFAIK most mail clients are blocking access to external resources (and some may not support using custom fonts). I would start by testing a simple external stylesheet (that would make h1 red for example) to see which mail clients are downloading external stylesheets.

    Tuesday, July 24, 2018 8:44 AM
  • User969992919 posted

    I am sending to both yahoo and gmail and i am getting the same problem in both

    Tuesday, July 24, 2018 12:34 PM
  • User475983607 posted

    I am sending to both yahoo and gmail and i am getting the same problem in both

    Contact yahoo and gmail support for assistance.  They can better assist you with their services.

    Tuesday, July 24, 2018 1:57 PM
  • User-1171043462 posted

    The Custom Font must be installed on Client PC where the email will be read then only he will see the Font.

    Tuesday, July 24, 2018 2:30 PM
  • User753101303 posted

    Try F12 Network and/or F12 Console to see what happens for the font download query. It might be blocked even in a web mail for safety/privacy reasons.

    Tuesday, July 24, 2018 4:19 PM