Jump to content

Recommended Posts

Posted

Experts,

I am using _INetsmtpMail method and it works wonderfully for me.

But the problem is,  I am not sure how can I have some hyperlink or font variation/color variation in email body.

Example : in below code I would like to have fifth line as hyperlink to some page ( say www.google.com) and sixth (last) line as smaller font with red color ( like warning)

#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[6]
$as_Body[0] = "Hello MakzNovice,"
$as_Body[1] = ""
$as_Body[2] = "Can you do this for me?"
$as_Body[3] = ""
$as_Body[4] = "Some Hyperlink 'here'"
$as_Body[5] = "small font with Red color text here"

Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
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

Any guidelines or help will be highly appreciated.

Cheers !!!

It doesn't get easier, you just get better...

Posted

I highly suggest using Jos' SMTP Mailer here: (it supports HTML by default)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Posted
44 minutes ago, MakzNovice said:

where my problem lies

Could you explain what your problem is? Why is putting in your username and password an issue?

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

  • Developers
Posted
1 hour ago, MakzNovice said:

@seadoggie01 The problem is it needs user id and password as mandatory fields, which is where my problem lies.

This is only the case when the target site requires it, so there is no UDF requirement at all for these fields!

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...