Jump to content

Send mail with URL link and different font size


 Share

Recommended Posts

Hi

I have been looking at the _INetSmtpMail example and I got it to work, but I have a question regarding that I would like to send a url link and use different font size.

Is this possible to do with this function? If not what should I use instead?

Yours sincerely

Kenneth.

Link to comment
Share on other sites

I'm sorry, but I don't know how to use that with the Autoit example:

#include <Inet.au3>
#include <MsgBoxConstants.au3>

Local $s_SmtpServer = "mysmtpserver.com.au"
Local $s_FromName = "My Name"
Local $s_FromAddress = "From eMail Address"
Local $s_ToAddress = "To eMail Address"
Local $s_Subject = "My Test UDF"
Local $as_Body[2]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"
Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @ComputerName, -1)
Local $iErr = @error
If $iResponse = 1 Then
    MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent")
Else
    MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr)
EndIf

😳

Yours sincerely

Kenneth.

Link to comment
Share on other sites

$as_Body[2] is an array and therefore to add lines in your pasted example :

 

Local $as_Body[2]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"

change the 2 into amount of lines ... eg 4 then 

$as_Body[2] = "Third Line"
$as_Body[3] = "Fourth Line"

 

Edited by Dan_555

Some of my script sourcecode

Link to comment
Share on other sites

Then use the UDF by Jos (linked to by Trong). Create a string out of the array uisng _ArraytoString.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I'm in progress of that. I haven't yet started to use the array, so I don't think I need to use _ArrayToString.

 

Local $Body = "<h2>Dear " & $sUsername & "</h2><br>" & _
              "<a href=""https://company.service-now.com/sp?id=sc_category&sys_id=7d46b111db5503004d30f7871d9619be&catalog_id=-1&spa=1"">IT Support</a>"

But this is what I have done.

Yours sincerely

Kenneth.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...