Как отправить HTML письмо из MT4.

 

Советник получивший сигнал о входе в рынок должен отправлять письмо с прикрепленной картинкой графика. Если сигнал хороший, я включаю компьютер и сам открываю сделку.

 

Вопрос в том как отправить html письмо с картинкой по почте?

Намеки на то что это возможно, были здесь и здесь. Но внятного ответа я так и не получил.

Вот код для отправки письма

string theme = "text/html";

string text = "<html> <head> "+ "“Тестовое письмо" +  TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS)+"   "+

"<img src=\"https://c.mql4.com/i/avatar/2010/5/36774_1273826964.jpg\" "/> "

+ "\<\head> <\html>  ";

 

SendMail(theme,text); 

 

 Вот то, что приходит на яндекс

 

 

Как сделать что был вместо тегов было html письмо с картинкой и текстом. 

 

Потому что у вас формат кривой как минимум посмотрите вот это :  http://www.xiper.net/manuals/html/

Где то в англоязычном кодбейзе за позапрошлый год есть готовая библа для работы  с Жмейлом 

 
FAQ:

Потому что у вас формат кривой как минимум посмотрите вот это :  http://www.xiper.net/manuals/html/

C HTML   у меня нет проблем.

Даже при отправке простого кода, на почту все равно приходит письмо с тегами и скобками. А должен быть большой шрифт.

int start()
  {
//----
   string text = "<html>";
   text = StringConcatenate(text,"<body><h1>Hello, World!</h1>");
   text = StringConcatenate(text,"<p>HTML formated email Sent from MT4.</p></body></html>");
//----
   SendMail("Hello, World!",text);
//----
   return(0);}

   

 

Не забывайте указать Content-Type, т.к. почтовый клиент не обладает телепатическими способностями


Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<HTML>
<HEAD>
<LINK REL=HTMLAttrib HREF="cid:abodkelsa">
<STYLE TYPE="text/css">
<!--
.yogi--picnic-com {
  color: black;
  font-weight: bold; 
  font-style: normal;
  text-decoration: none;
  }

.booboo--jellystone-org {
  color: blue;
  font-weight: normal
  font-style: normal;
  font-decoration: none;
  }
.attribution {
  font-style: italic;
  text-decoration: underline;
  margin-bottom: 0em;
  }
-->
</STYLE>
</head>
<body bgcolor="#FFFFFF">
<BLOCKQUOTE CITE="mid:FD1D3K3KASDDFD17C00805FD459C86BB2BF@POPDOG">
    <SPAN CITE="mid:A3F9D8E1A3FD23DF3SDF3S321FD459C86BB2BF@POPDOG">
        <P CLASS="attribution">On Tuesday, 1/14, Yogi Beera wrote:</p>
    </span>
    <P CLASS=yogi--picnic-com>Konck 
    <SPAN CITE="mid:A3F9D8E1A3FD23DF3SDF3S321FD459C86BB2BF@POPDOG"
         CLASS="booboo--jellystone-org">
    you misspelled "knock"... 
    </span>Knock</p>
</blockquote>
<P CLASS="booboo--jellystone-org">Who's there?</p>
</body>
</html>
 
Reshetov:


Не забывайте указать Content-Type, т.к. почтовый клиент не обладает телепатическими способностями




попробывал тож отправить на яндекс. че только не вводил, приходят письма только в виде тегов и скобок.   

если есть у кого то рабочий пример поделитесь. 

 
panelektrik:



если есть у кого то рабочий пример поделитесь. 

В почтовом клиенте откройте какое нибудь сообщение и посмотрите его выбрав в меню "Исходный код". Я бы продемонстрировал, но вломы свой адрес в нескольких местах удалять и светить его неохота.
 
Для забаненных в гугле :  http://citforum.ru/internet/common/rfc1521.shtml
 
Reshetov:
В почтовом клиенте откройте какое нибудь сообщение и посмотрите его выбрав в меню "Исходный код". Я бы продемонстрировал, но вломы свой адрес в нескольких местах удалять и светить его неохота.

<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" lang="ru" class="m-locale_ru m-layout_2pane" xml:lang="ru"><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7,IE=edge" /><title>Яндекс.Почта</title><meta name="application-name" content="Яндекс.Почта" /><meta name="msapplication-starturl" content="/neo2/" /><meta name="google" value="notranslate" /><meta name="msapplication-task" content="name=Проверить почту;action-uri=/neo2/;icon-uri=//mailstatic.yandex.net/neo2/6.8.7/static/blocks/jane/b-pinned-icons/check.ico" /><meta name="msapplication-task" content="name=Написать письмо;action-uri=/neo2/#compose;icon-uri=//mailstatic.yandex.net/neo2/6.8.7/static/blocks/jane/b-pinned-icons/compose.ico" /><meta name="msapplication-task" content="name=Записать видеописьмо;action-uri=/neo2/#compose/tab=videoletter;icon-uri=//mailstatic.yandex.net/neo2/6.8.7/static/blocks/jane/b-pinned-icons/compose_video.ico" /><meta name="msapplication-task" content="name=Отправить открытку;action-uri=/neo2/#compose/tab=postcard;icon-uri=//mailstatic.yandex.net/neo2/6.8.7/static/blocks/jane/b-pinned-icons/compose_postcard.ico" /><!--[if gt IE 7]><!--><link rel="stylesheet" href="//mailstatic.yandex.net/neo2/6.8.7/hubs/boot/boot/_weather.css" /><!--<![endif]--><!--[if lt IE 8]><link rel="stylesheet" href="http://mailstatic.yandex.net/neo2/6.8.7/hubs/boot/boot/_weather.ie.css" /><![endif]--><script data-id="338"> try { if ((self.parent && !(self.parent === self)) && (self.parent.frames.length != 0)) { self.parent.location = document.location; } } catch(e) {} document.documentElement.id="js"; try { var startLoadTime = window.performance.timing.navigationStart; } catch(e) { startLoadTime = +new Date(); } </script> <!--if lt IE 9]><!--><link id="favicon" type="image/x-icon" rel="shortcut icon" href="/neo2/favicon.ico" /><!--<![endif]--><!--[if lt IE 8]><link rel="shortcut icon" type="image/x-icon" href="/neo2/favicon-ie9.ico"/><![endif]--> <script data-id="338" id="insert-js">var Daria={"ALLOW_3PANE":true,"isFatalError":false,"isSecure":false,"suid":"88041148","uid":"34907711","login":"panelektrik","account":"panelektrik","themeId":"weather","yatester":false,"IS_CORP":false,"IS_KCUF":false,"product":"RUS","layout":"2pane","lcn":14361,"locale":"ru","locales":["ru","en","tr","tt","uk","az","be","hy","ka","ro","kk"],"nocache":"","handlersPrefix":"/neo2/handlers","staticSuffix":"","pddPrefix":"","lastLoginDate":null,"cs":338,"XivaSign":{"sign":"2f2ad11a87393709ef5376794ea765e7","ts":1352250598,"uid":"34907711","timestamp":1352243398},"Config":{"IPV4":true,"IPV6":false,"mail-url":"http://mail.yandex.ru","yandex-domain":"yandex.ru","passport-domain":"yandex.ru","passport-host":"passport.yandex.ru","passport-internal-host":"passport-internal.yandex.ru","passport-url":"http://passport.yandex.ru/passport","passport":"pass.yandex.ru","staticPath":"//mailstatic.yandex.net/neo2/6.8.7/static","staticRoot":"//mailstatic.yandex.net/neo2/6.8.7","mailUploadServiceUrl":"/neo2/handlers/upload_attachment.jsx","kraskiSwfUrl":"http://swf.static.yandex.net/mail/yandex-mail-painter-loader.swf","kraskiUploadUrl":"http://put2.cards.yandex.ru","version":"6.8.7","version_full":"6.8.7-0","date":"01.11.2012","xivaHost":"xiva-daria.mail.yandex.net","metricaID":"1143050","showWizardUntil":"1331064000000","social-host":"//social.yandex.ru","PDD":{"domain":"","url-prefix":""},"clck-host":"clck.yandex.ru","XSL":{"url-prefix":"","original-url":"http%3A%2F%2Fmail.yandex.ru%2Fneo2%2F","services":{},"validator-url":"http://validator.yandex.ru","showAds":"yes","region-code":"","region_id":"187","uid":"34907711"},"showBearsPromoBubble":true,"exit-url":"http://passport.yandex.ru/passport?mode=logout&yu=3263398561332714185&retpath=http%3A%2F%2Fwww.yandex.ru","exitall-url":"http://passport.yandex.ru/passport?mode=logout&yu=3263398561332714185&global=1","help-url":"http://help.yandex.ru/mail/"},"hasYaBar":false,"prefetchUserInfo":{"handlers":[{"name":"account-information","gid":0,"data":{"uid":"34907711","suid":"88041148","ckey":"Vx3i7Ri/lG9cp9y9Qtch2L5v9zcVULy2KKOF4lwgWss=","db":"mdb180","dc":"","yandex_account":"panelektrik","login":"panelektrik","region_id":"187","locale":"ru","region_code":"ua","reg_country":"ua","timezone":"Europe/Moscow","reg_date":"1203880875000","display_name":"panelektrik","use_moko":"true","birthday":"1980-01-17","sids":["2","36"],"kstatus":"0","compose-check":"157d53a410eac8accc63a49719d7d8d2","home":"no","email":[{"login":"panelektrik","domain":"yandex.ru"},{"login":"panelektrik","domain":"narod.ru"},{"login":"panelektrik","domain":"ya.ru"},{"login":"panelektrik","domain":"yandex.com"},{"login":"panelektrik","domain":"yandex.ua"},{"login":"panelektrik","domain":"yandex.kz"},{"login":"panelektrik","domain":"yandex.by"}]},"timer_logic":"12591"},{"name":"settings","gid":0,"data":{"quotation_char":">","signature":"","default_mailbox":"yandex.ru","from_name":"Старыгин Константин","messages_per_page":"30","page_after_send":"done","page_after_delete":"current_list","page_after_move":"current_list","subs_messages_per_page":"20","imap_status":"off","abook_page_size":"50","label_sort":"by_count","default_email":"panelektrik@yandex.ua","skin_name":"neo2","mobile_messages_per_page":"15","color_scheme":"weather","enable_quoting":true,"enable_firstline":true,"enable_social_notification":true,"show_advertisement":true,"show_news":true,"show_avatars":true,"collect_addresses":true,"save_sent":true,"enable_autosave":true,"alert_on_empty_subject":true,"pop_spam_subject_mark_enable":true,"enable_pop":true,"enable_imap":true,"suggest_addresses":true,"enable_images":true,"subs_show_item":true,"subs_show_informer":true,"subs_show_line":true,"dnd_enabled":true,"translate":true,"reply_to":["pan_elektrik@inbox.ru"]},"timer_logic":"9283"},{"name":"user-settings","gid":0,"data":{"last_search":"17-JAN-12","message_head_full":"on","no_bears_bubble":"on","no_newyear_bubble":"on","no_translator_bubble":"on","noa":"1","rph":"mozilla=0&opera=1&webkit=0","show_iphone_promo":"1"},"timer_logic":"3679"}]},"SIDS":["2","36"],"mailFavicon":"/neo2/favicon.ico"}</script><script src="//mailstatic.yandex.net/neo2/6.8.7/jsx/_bootstrap.js" data-id="338" crossorigin="anonymous"></script><script data-id="338">(function(e){var t="6.8.11",n="//mailstatic.yandex.net/mail/"+t+Daria.staticSuffix;e.addProject("mail",{ipv6:!0,version:t,"static":n,require:["mail.mail.css"],locales:["az","en","ru","tr","tt","uk","kk","be","hy","ka","ro"],prefetch:function(e,t){t.handlers.push("folders","labels","messages");if(Daria.layout!="2pane"||Daria.threadedView)t.params.threaded="yes";var n=["mail.mailbox.js","mail.mailbox.yate"],r;return/^#compose/.test(e)?(t.handlers.push("postcards"),n=n.concat("mail.compose.js","mail.compose.yate")):/^#done/.test(e)?n=n.concat("mail.compose.js","mail.compose.yate"):/^#setup/.test(e)?(n=n.concat("mail.setup.js","mail.setup.yate"),/abook/.test(e)&&n.push("mail.abook.js","mail.abook.yate")):/^#contacts/.test(e)?n=n.concat("mail.abook.js","mail.abook.yate"):e&&(r=e.match(/^#message\/(\d+)/))&&(t.params.ids=r[1],t.handlers.push("message")),n}}),e.addModules(["mail.compose.js","mail.compose.yate","mail.mailbox.js","mail.mailbox.yate","mail.mailbox_compose.js","mail.mailbox_compose.yate","mail.mailbox_setup.js","mail.mailbox_setup.yate","mail.setup.yate","mail.setup.js","mail.mailbox_abook.js","mail.mailbox_abook.yate","mail.abook.yate","mail.abook.js","mail.mail.css"])})(Jane.Services);(function(e){var t="1.1.10-0",n={version:t,"static":"//mailstatic.yandex.net/todo/1.1.10"+e.staticSuffix,"xsl-static":"/todo/1.1.10"+e.staticSuffix},r=Jane.Services,i=r.Params;Jane.Config.todo=n,r.addProject("todo",{ipv6:!0,locales:["az","be","en","hy","ka","kk","ro","ru","tt","tr","uk"],version:t,root:"/todo","static":n["static"],xsl:n["xsl-static"]}),r.addModules(["todo.todo.js","todo.todo.xsl","todo.todo.css"]);var s={_onloadCallbacks:[],_loaded:!1,load:function(e){if(this._loaded)e&&e();else{e&&this._onloadCallbacks.push(e);var t=["todo.todo.js","todo.todo.yate","todo.todo.css"];i["msie-suffix"]&&t.push("todo.todo.ie-css");var n=this;r.runModules(t,function(){n._loaded=!0;var e=n._onloadCallbacks;for(var t=0,r=e.length;t<r;t++)e[t]();n._onloadCallbacks=[]})}},init:function(){Jane.Handler.getAll(["settings","user-settings"],{},function(){var e=0;if(Jane.$H("settings").isSet("show_todo"))e=1;else{var t=Jane.$H("user-settings");t.hasSetting("todo_promo")&&t.isSet("todo_promo")&&(e=2)}e>0&&s.load(function(){s.initWdgt(e)})})}};window.Todo=s,r.addPageinitCallback(function(){function t(){window.setTimeout(function(){s.init()},1)}if(e.isFatalError)return;window.DariaAfterLoad?t():Jane.events.bind("pageinit",t)})})(Daria);;Jane.Services.bootstrap();</script><script src="//mailstatic.yandex.net/jquery/1.8.2/jquery.min.js" data-id="338" crossorigin="anonymous"></script><script data-id="338">Jane.Services.postBootstrap();</script></head><body><div style="position:absolute;left:-9999em;top:-9999em;" role="alert"><a href="go2lite.jsx?clck=1">Если вы пользуетесь программой экранного доступа, переключитесь, пожалуйста, на легкую версию почты. Это позволит вам легче ориентироваться на страницах.</a></div><div class="b-page"><div class="b-page__content"><i class="b-head-decor"><i class="b-head-decor__inner"></i></i><div class="b-header"><div class="b-stamp b-stamp_loading b-stamp_default"><a class="b-stamp__logo daria-action" href="http://www.yandex.ru" data-action="feedback.logo.clck"><span class="b-stamp__logo__i"></span><img border="0" alt="Яндекс" title="Яндекс" class="b-stamp__logo__image" src="//yandex.st/lego/_/X31pO5JJJKEifJ7sfvuf3mGeD_8.png" /><span class="b-stamp__logo__pdd-domain"></span></a><a class="b-stamp__mail daria-action" href="#inbox" data-action="mailbox.check" data-params="from-logo"><span class="b-stamp__mail__text">почта</span><span class="b-stamp__beta"></span></a><a class="b-stamp__refresh daria-action" data-action="mailbox.check"><img class="b-ico b-ico_check-mail" src="//mailstatic.yandex.net/neo2/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif"/></a> </div><div class="b-header__right"><a href="http://i.yandex.ru/" class="b-userpic b-userpic_small"> <img class="b-userpic__img" alt="" data-src="//upics.yandex.net/34907711/small" src="//yandex.st/lego/_/La6qi18Z8LwgnZdsAr1qy1GwCwo.gif" /><i class="b-userpic__i"></i></a><div class="b-mail-dropdown"><div class="b-mail-dropdown__content"><span data-action="dropdown.toggle" data-params="counter=71266:head.login" class="daria-action b-mail-dropdown__handle b-mail-dropdown__handle_user"><a class="daria-action b-link b-link_header b-link_w b-link_js" data-action="common.clck" data-params="metrika=Меню за логином в шапке:Клик" href="http://i.yandex.ru/"><span class="b-link__i">panelektrik@yandex.ua</span><span class="b-link__arrow">▼</span></a></span></div></div><div class="b-header__right__wrap"><a class="b-link b-link_header b-link_setup" href="#setup">Настройка</a></div><div class="b-theme-teaser g-hidden"><a class="b-theme-teaser__cover daria-action" data-action="settings.update-color-scheme" data-params="mcounter=Темы:Клик на уголочек&color_scheme=kitekat" href="#"></a></div></div> <div class="b-header__middle"> <a class="b-link b-link_header" href="http://www.yandex.ru">Поиск</a><a class="b-link b-link_current b-link_header daria-action" href="#inbox" data-action="mailbox.check">Почта</a><a class="b-link b-link_header" href="http://my.ya.ru">Я.ру</a><a class="b-link b-link_header" href="https://money.yandex.ru">Деньги</a><a class="b-link b-link_header" href="http://moikrug.ru">Мой&#160;Круг</a><a class="b-link b-link_header" href="http://fotki.yandex.ru">Фотки</a><a class="b-link b-link_header" href="http://narod.yandex.ru">Народ</a><a class="b-link b-link_header" href="http://cards.yandex.ru">Открытки</a> <div class="b-mail-dropdown"><div class="b-mail-dropdown__content"><span data-action="dropdown.toggle" class="b-mail-dropdown__handle daria-action"><a class="b-link b-link_header b-link_w b-link_js"> <span class="b-link__i">ещё</span> <span class="b-link__arrow">▼</span></a></span><div class="b-mail-dropdown__box"><div class="b-mail-dropdown__box__content"> <div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://auto.yandex.ru">Авто</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://afisha.yandex.ru">Афиша</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://blogs.yandex.ru">Блоги</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://video.yandex.ru">Видео</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://images.yandex.ru">Картинки</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://maps.yandex.ru">Карты</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://yaca.yandex.ru">Каталог</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://market.yandex.ru">Маркет</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://music.yandex.ru">Музыка</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://news.yandex.ru">Новости</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://pogoda.yandex.ru">Погода</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://rabota.yandex.ru">Работа</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://rasp.yandex.ru">Расписания</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://slovari.yandex.ru">Словари</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://tv.yandex.ru">Телепрограмма</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://uslugi.yandex.ru">Услуги</a></div><div class="b-mail-dropdown__separator"></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://mobile.yandex.ru">Мобильный</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://soft.yandex.ru">Программы</a></div><div class="b-mail-dropdown__item"><a class="b-mail-dropdown__item__content" href="http://www.yandex.ru/all">Все&#160;сервисы</a></div></div></div></div></div></div> </div><noscript><div class="b-load-message"><p>Эта версия почты не работает с отключенным JavaScript.</p><p><a href="http://help.yandex.ru/mail/?id=1116032">Как включить JavaScript</a>.</p></div></noscript><div class="b-load-message fatal-error g-hidden" id="fatal-error"><p> Произошла ошибка.</p><p>Попробуйте обновить страницу браузера или повторить попытку через несколько минут.</p></div><div class="block-app" id="block-app"><div class="block-app__loading"><div id="app-loading1" class="b-load-message g-hidden">Подождите, пожалуйста...</div><div id="app-loading2" class="b-load-message b-load-message_secondary g-hidden"><p>Загрузка почты занимает больше времени, чем мы ожидали.<br/>Вероятно, это связано с низкой скоростью интернет-соединения.</p><p>Если у вас одна из <a href="http://browsers.yandex.ru/">последних версий браузера</a>, и обновление страницы (<span class="js-win g-hidden">клавиша F5</span><span class="js-mac g-hidden">сочетание клавиш cmd+R</span>) не помогло, воспользуйтесь <a href="../pda2">легкой версией</a> почты.</p></div></div></div></div></div><div class="b-page-bottom"><i class="b-foot-decor"><i class="b-foot-decor__inner"></i></i><div class="b-footer g-line"><div class="b-footer__col b-footer__col_left"><span title="6.8.7">Версия от 01.11.2012</span> <a href="http://mail-blog.ya.ru/" class="b-footer__link daria-action" data-action="footer.whats-new"><br /><img class="b-mail-icon" src="//favicon.yandex.net/favicon/my.ya.ru" />Блог Яндекс.Почты</a> <br /><a href="http://mail-blog.ya.ru/replies.xml?item_no=4017" class="b-footer__link b-footer__link_plasticine g-hidden" data-action="footer.how-plasticine">Как делалась пластилиновая тема</a></div><div class="b-footer__col b-footer__col_right"><div class="b-footer__block b-footer__block_versions"> <a href="http://mobile.yandex.ru/mail" class="b-footer__link b-footer__link_mobile">Яндекс.Почта для телефонов</a><br /> <a href="http://mail.yandex.ru/lite/inbox" class="b-footer__link">Лёгкая версия</a></div><div class="b-footer__block b-footer__block_links">  <a href="#setup/journal" class="b-footer__link b-footer__link_type_journal"></a><br />  <a href="http://help.yandex.ru/mail/" class="b-footer__link b-footer__link_help">Помощь</a> · <a href="http://feedback2.yandex.ru/mail/" class="b-footer__link">Служба поддержки</a> · <a href="http://advertising.yandex.ru/media/banner/mail.xml?from=mail-ru" class="b-footer__link">Рекламодателям</a> </div>  <div class="b-footer__block b-footer__block_copyright"><span class="b-footer__copyright">© 2001—2012  «<a class="b-footer__link" href="http://www.yandex.ru">Яндекс</a>» </span></div><div class="b-footer__block b-footer__block_lang"></div></div></div></div> <i class="l-head__gap" style="background:url(//www.tns-counter.ru/V13a****yandex_ru/ru/CP1251/tmsec=yandex_mail/0)"></i> </body></html> 
 и что тут можно понять?
 
FAQ:
Для забаненных в гугле :  http://citforum.ru/internet/common/rfc1521.shtml

нужен просто рабочий пример.
 

Не ХТМЛь код письма, а "просмотреть оригинал", да и ну почему же вы не хотите учится, так же лучше запомнится , когда сам.

важно : в начале письма должен быть заголовок для  почтовой службы, вот его то у вас и нет :

 

MIME-Version: 1.0 /*версия*/
Return-Path: /*обратный адрес*/
X-Mailer: /*отправитель*/
From: "noreply@metaquotes.net" <noreply@metaquotes.net>
To: "Кому(имя)" <xхххх@gmail.com(почтовый адрес получателя)>
Date: 2 Nov 2012 14:40:01 +0100 /*думаю понятно*/
Subject: /*заголовок (тема письма)*/
Content-Type: text/html; charset=utf-8 /*Тип письма (ХТМЛь)*/ Content-Type: text/plain; charset="UTF-8" /*обычный текст и кодировка*/ 
Content-Transfer-Encoding: base64 /*если зашифрованное , то ключ и тип*/

И вот здесь то уже сам текст письма в указанном формате.
 

ЗЫ. в вашем случае заголовок формирует сам терминал, а в нем стопудово Content-Type: text/plain; 

хотя конечно можно попробовать вставить тип в сам заголовок, может прокатит, почтовая служба поддерживает письма с разными форматами внутри.  

Причина обращения: