Jump to content
Sign in to follow this  
WilliamasKumeliukas

INetSmtpMail function question

Recommended Posts

WilliamasKumeliukas

is it possible to modify the size and color of letters in body text? so when i receive a email, the body text will be  in different sizes and colors chosen in the script.

if yes, how could it be done?

Thanks

 

Regards,

AutomateLover

Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

im using inetsmtpmailcom atm but im not familliar with html codes :S


Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
water

As a good starting pint check W3Schools for HTML.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

my whole body text is from lots of variables I'm just wondering how I can use the hmtl code into a specific variable so it wont affect others.


Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
water

Simply insert the variable wherever needed into HTML tags.

$sText = "bold"
$sText  = "<HTML><Body>This is <b>" & $sText & "</b> text.</body></html>"

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

how can I keep the email "proper" while using <HTML><Body> with all my @CRLF working?


Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
water

Replace @CRLF with the corresponding HTML tags. Either <p> for a new paragraph or <br> for a line break.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

Replace @CRLF with the corresponding HTML tags. Either <p> for a new paragraph or <br> for a line break.

how come it affect my whole body text even the parts that are outside of the HTML codes?


Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

sorry for double posts but here is my body text in my script, I just want to put a bigger font size and red color on $srvname to $tsrv variable. 

$Body = $space1 & @CRLF & $space2 & _
    @CRLF & @CRLF & @CRLF & @CRLF & "@@@@@@@@@@ Part One @@@@@@@@@@" & @CRLF & @CRLF & @CRLF & _
    $mastername & $cmaster[0] & " " & $cmaster[1] & $time & $tmaster & _
    @CRLF & @CRLF & $p99name & $cp99[0] & " " & $cp99[1] & $time & $tp99 & _
    @CRLF & @CRLF & $srvname & $csrv[0] & " " & $csrv[1] & $time & $tsrv & _
    @CRLF & @CRLF & $tsname & $cts[0] & " " & $cts[1] & $time & $tts & _
    @CRLF & @CRLF & @CRLF & @CRLF & "@@@@@@@@@@ Part Two @@@@@@@@@" & @CRLF & @CRLF & @CRLF & _
    $mastername & $cmaster2[0] & " " & $cmaster2[1] & $time & $tmaster2 & _
    @CRLF & @CRLF & $p99name & $cp992[0] & " " & $cp992[1] & $time & $tp992 & _
    @CRLF & @CRLF & $srvname & $csrv2[0] & " " & $csrv2[1] & $time & $tsrv2 & _
    @CRLF & @CRLF & $tsname & $cts2[0] & " " & $cts2[1] & $time & $tts2
Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
water

The whole mail body is taken as HTML.

When a Browser or Mail client formats HTML then all @CRLF and spaces are ignored. So your text should look like:

$Body = $space1 & "<br>" & $space2 & _
    "<p>" & "@@@@@@@@@@ Part One @@@@@@@@@@" & "<p>" & _
    $mastername & $cmaster[0] & " " & $cmaster[1] & $time & $tmaster & _
    "<p>" & $p99name & $cp99[0] & " " & $cp99[1] & $time & $tp99 & _
    "<p>" & $srvname & $csrv[0] & " " & $csrv[1] & $time & $tsrv & _
    "<p>" & $tsname & $cts[0] & " " & $cts[1] & $time & $tts & _
    "<p>" & "@@@@@@@@@@ Part Two @@@@@@@@@" & "<p>" & _
    $mastername & $cmaster2[0] & " " & $cmaster2[1] & $time & $tmaster2 & _
    "<p>" & $p99name & $cp992[0] & " " & $cp992[1] & $time & $tp992 & _
    "<p>" & $srvname & $csrv2[0] & " " & $csrv2[1] & $time & $tsrv2 & _
    "<p>" & $tsname & $cts2[0] & " " & $cts2[1] & $time & $tts2

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

ok thanks :)

Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

since I use alot of conditionals, I want it to have red font color on the full line only if a specific file doesn't exists, how could I do this?

here is my conditionals related to srv and what i've done so far:

$asrv = _FileListToArray("E:\BKP\ESX1\SRV\","*",2,True)
If Not FileExists($asrv[1] & "\SRV-flat.vmdk") Then
    $dsrv = FileGetTime("C:\Dropbox\BKP\trap.txt")
    $srv = FileGetSize("C:\Dropbox\BKP\trap.txt")
    $tsrv = $dsrv[0] & "-" &  $dsrv[1] & "-" & $dsrv[2] & '  ' & $dsrv[3] & "h " & $dsrv[4] & "min " & $dsrv[5] & "sec"
    $csrv = _ConvertSize($srv)
    $srvname = '<font color="#FF0000">SRV-flat.vmdk:   </font>'
Else
    sleep(50)
    $dsrv = FileGetTime($asrv[1] & "\SRV-flat.vmdk")
    $srv = FileGetSize($asrv[1] & "\SRV-flat.vmdk")
    $tsrv = $dsrv[0] & "-" &  $dsrv[1] & "-" & $dsrv[2] & '  ' & $dsrv[3] & "h " & $dsrv[4] & "min " & $dsrv[5] & "sec"
    $csrv = _ConvertSize($srv)
    $srvname = "SRV-flat.vmdk:  "
EndIf
Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

if someone know how, it would be really appreciate if he's could help me :( i'm kinda stuck.

I just want to set text with red color on output of my variables.

Regards

Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites
water

What do you get right now?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

it returns the file size and his last modified date.

I volountarly edited the file name so he's always returns to the right part. theres is what I receive on my email:

SRV-flat.vmdk: 1.46 MB / Date du backup: 2009-09-29 12h 49min 53sec

I want it to be the full line red color.

Edited by AutomateLover

Do not like my dirty code? It's okay, but, in my opinion, the dirty codes are unique and I think it's a good glimpse of how the mind of the person who wrote it thinks, and that, that's what I call a psychological deduction step by step in all its splendor.

~WilliamasKumeliukas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×