Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

Yes, but the UDF Mr. Trong linked to, does not seems to be an array.

$as_Body can't send HTML and Mr. Trong linked to the UDF that can send HTML.

Yours sincerely

Kenneth.

Posted

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 2024-07-28 - Version 1.6.3.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 (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

 

Posted

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.

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
  • Recently Browsing   0 members

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