Below is an example function used in my classic asp code to send e-mail with Attachments. The e-mail is written in HTML format and attachments picked up from the physical path on the Server where the Application is hosted on IIS.
I’m using a hard-coded path in the sample below for the Attachment example. You can create a dynamic string by fetching the path from the DB.
I’m using CDOSYS mail provider object below to send e-mail.
Function GenerateEmailCEF(senderemail, recipient) MailProvider = "CDOSYS" EmailFmt = 0 'For HTML, 1 is for Plain Text ' SMTP Server Config Dim rsSMTPSendUsing, rsSMTPServer, rsSMTPServerPort, rsSMTPSendUsername, rsSMTPSendPassword, rsSMTPUseSSL Dim SMTPSendUsing, SMTPServer, SMTPServerPort, SMTPSendUsername, SMTPSendPassword, SMTPUseSSL
SMTPSendUsing = "1" SMTPServer = "smtp.xx.xx" 'Change as per your configuration. SMTPServerPort = "25" SMTPSendUsername = "" SMTPSendPassword = "" SMTPUseSSL = "false"
if MailProvider = "CDONTS" then set objMail=CreateObject("CDONTS.NewMail")
if MailProvider = "CDOSYS" then set objMail =CreateObject("CDO.Message")
if SMTPSendusername <> "" then objmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPSendusername objmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPSendPassword objmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 end if
I’ve found LogParser tool to be very useful for querying log files especially whenever I am required to analyze the IIS log files. You can download LogParser from here.
In this example, I’ll be querying multiple Log files unique users with Windows Authentication visiting the site. Click on the icon “Choose Log files/folders to query” and Add all files which you want to search. Open a New Query window and in the Query editor, enter the below query:
SELECT DISTINCT cs-username FROM '[LOGFILEPATH]'
This works much like SQL queries where IIS log headers work like columns. The above query will simply return distinct users visiting the site. Make sure the Log Type selected is W3CLOG.
If you want to Output all the data to a .csv file, then you can use the below query:
SELECT SELECT DISTINCT cs-username INTO '[OUTFILEPATH]users.CSV' FROM '[LOGFILEPATH]'
You can check the default export directory where the file is created. It should be something like this “C:\Users\<username>\AppData\Roaming\ExLPT\Log Parser Studio\Output”.
I have an Intranet Application where a .docm template downloaded from a ReactJS UI as a blob is opening in Protected View on the users’ machines. This is happening when downloading in browsers other than IE or Edge browser in IE mode.
When you download the document from Chrome or other browsers, MS Word is considering it as an Internet Application. Hence, the checkbox for Protected View is applying these changes and downloading it in Protected View.
The code to download this as a blob is in ReactJS is available here.
I came across this issue that all Material Table used in the ReactJS Application are not showing bottom border in the th row in the Firefox browser. This issue is not reproducible in Chrome.
So, I found css hack where you can simply change the position attribute specifically for the Firefox browser in the default MuiTableCell-head class. This class is applied at the cell level by Material-table.
The above code will remove the default sticky value for position which causes the issue with border-collapse in the .MuiTable-root class. You can also remove the border-collapse in a similar fashion but do test that it’s not breaking anything else.
The component which has the Material-table code should import the above css to take effect. This hack might also work generally for html table if you’re facing a similar issue without Material-table.
One common challenge in ReactJS is updating Child Components from Parent Component in a form. I faced this scenario recently where after a series of GET calls where the order is decided by the browser threads, data is not always available in the same order.
If you need to set some permissions based on an API GET call and then enable/disable a child component, you can use the following ReactJS lifecycle method:
When your React Native Application is ready for release to the Android Platform, you need to perform the following steps to create the .aab file or Android App Bundle which contains your compiled code and resources and you can upload to the Play Store. The APK generation and signing is done by Google Play.
I’m using React Native 0.62.2 for this post in VS Code.
Open Terminal and check the Java Home Path:
cd to the path displayed as shown in the image.
Run the keytool command as shown using sudo to generate the keystore and alias as shown below: