0 votes

Hello,

I'm looking to create some HTML Emails for my maintenance notifications. I was hoping to use the full spoken date rather than the numerical date you find in the property value references:

%datetime,+7d%
%adm-CurrentDateTime,+7d%

I was wondering if there's a variable or another method I can use so instead of this:

11/16/2015 5:28:57 PM

It comes out as:

November 16th, 2015 5:28:57 PM

by (810 points)

1 Answer

0 votes
by (216k points)

Update 2018

Starting with Adaxes 2018.1 you can specify the date format when using value references. For details, have a look at section Format of date/time value references of the following help article: https://www.adaxes.com/help/ValueReferences/#format-of-date/time-value-references.

Original

Hello,

To achieve what you want, you'll need to send email messages with the help of a PowerShell script. For example, to get a date which is 7 days later than the current date in a full date format, you can call the following line:

[System.DateTime]::Now.AddDays(7).ToString("F")

For a full list of possible formats, see a description of the System.DateTime::ToString method available from Microsoft: https://msdn.microsoft.com/en-us/librar ... 10%29.aspx.

To send HTML-formatted emails from Business Rules, Custom Commands and Scheduled Tasks, you can use the $Context.SendMail method and pass the HTML-formatted message as the 4th parameter. For example:

$to = "recipient@example.com"
$subject = "HTML-Formatted Notification"
$targetDateString = [System.DateTime]::Now.AddDays(7).ToString("F")
$htmlText =
@"
<p>
   The event you expect will occur on <b>$targetDateString</b>.
</p>
"@

$Context.SendMail($to, $subject, $NULL, $htmlText)

To add a script to a Business Rule, Custom Command or Scheduled Task, use the Run a program or PowerShell script action.

0

I will give that a shot.

I'll do some testing but the SMTP server we are sending through requires Auth with the int64 user and password format. Is it possible to authenticate using this method?

Related questions

0 votes
1 answer

Hi Support, I'm trying to use adaxes to send a couple of branded emails with User information such as UPN and First name. I've written some HTML email code but would ... &lt;table class="wrapper" width="100%" cellspacing="0" align=center cellpadding="0"&gt;

asked Feb 18, 2020 by richarddewis (260 points)
0 votes
0 answers

Hello, I have a nice branded HTML email I'd like to use for the Self Service Invite and Self Service Password reset Emails. Is it possible to use HTML in the test fields under ... text so I'm guessing I can't but figured I'd ask rather than assume! Thanks!

asked Nov 19, 2015 by drew.tittle (810 points)
0 votes
1 answer

password reset emails - i need my company logo in the email - it does show up if you click on download pictures - but i cant ask the users to do this - so need to know if there is a way to embed the image in the email from adaxes.

asked Jul 28, 2021 by Nick Davis (20 points)
0 votes
1 answer

Hello, you helped us with a script to set the oof-message. Now we want to know, if it's possible to activate/deactivate the mail-forwarding option time-based. In the ... deactivate it accordingly on "param-abw-ende" Can you help me with that? Thanks Carsten

asked Nov 17, 2022 by lohnag (160 points)
0 votes
1 answer

In the user creation entry I have added a renamed custom attribute called Start Date so that the requester can only request accounts be created past a certain relative ... a limitation of the product or am I looking to implement this requirement incorrectly?

asked May 28, 2021 by manomano (80 points)
3,351 questions
3,052 answers
7,793 comments
545,113 users