Change in MS .cfg script - outlook

I have found an article on the HowTo-Outlook website (by Robert Sparnaaij) with instructions for how to show the sender's e-mail address as a column in Outlook's message view. I would like to do almost the same thing, but showing the recipient e-mail address in its own column. Can anyone advise how to edit Robert's viewsenderaddress.cfg file (downloaded from http://www.howto-outlook.com/howto/viewsenderaddress.htm) to work for the recipient, rather than sender, address? Thanks in advance.
NB - This is the cfg file as it stands:
DesignerRuntimeGuid={0006F020-0000-0000-C000-000000000046}
CLSID={00020D31-0000-0000-C000-000000000046}
DisplayName=Sender's Email Address
Category=Standard
Subcategory=Form
Comment=This form is used to expose the sender's email address in a View.
LargeIcon=IPML.ico
SmallIcon=IPMS.ico
Version=1.0
VersionMajor=1
VersionMinor=0
Locale=enu
Hidden=1
Owner=www.howto-outlook.com
ComposeInFolder=1
[Platforms]
Platform2=NTx86
Platform9=Win95
[Platform.NTx86]
CPU=ix86
OSVersion=WinNT3.5
[Platform.Win95]
CPU=ix86
OSVersion=Win95
[Properties]
Property01=SenderEmailAddress
[Property.SenderEmailAddress]
Type=30
NmidInteger=0x0c1f
DisplayName=From E-mail Address
[Verbs]
Verb1=1
[Verb.1]
DisplayName=&Open
Code=0
Flags=0
Attribs=2
[Extensions]
Extensions1=1
[Extension.1]
Type=30
NmidPropset={00020D0C-0000-0000-C000-000000000046}
NmidInteger=1
Value=1000000000000000

Related

Powershell and IBM/Lotus Domino

I have written 9 routines in the last few weeks in Powershell for Domino, they all appear to do what I need except 1!
This is the RegisterNewUser method, which does everything except the Email address. If I setup a user via Domino Administrator, I get everything including the email address ie internal address that is 'bob patz/smallhome'.
If I use my code this uses the registration process but all I end up with is the domain part of the internal email address '#smallhome'.
Does anyone know how to correct this? I don't think powershell uses the #formula language in any form, so I assume i somehow need to find the right column in a document or database and append the fullname in there somehow.
Is there anyone out there who can help in anyway?
regards
Mark
<#TOP TIP: THIS MUST RUN UNDER POWERSHELL (X86), ELSE IT WILL NOT WORK!!
This Powershell Function was created in March 2020 by (myself) Mark Baker as 'a' just to see if I can de-mystify
some of the Domino Database stucture, after running short bits of code and using Get-Member on some parts
of it and looking at online code snippets and reading some of the online info from IBM I have come up with
the function below to Create a New Lotus Notes User.
#
Original Code: 31/03/2020 by MBaker
A lot of work testing and diagnosing the different settings and values EVENTUALLY lead me to getting this working,
as at 08/04/2020 I just need to work out the settings for setting the correct email address per person.
#
This is how to use this function:
New-DominoUserRegistration "hazell" "C:\Program Files\IBM\Lotus\Notes\Data\ids\people\dhazell.id" "CN=Dom-01/O=Smallhome"
"Daniel" "" "swindon" "Work" "comment" "mail\dhazell" " " "password" 176
"dhazell"
Main use of this function is to connect to an IBM Domino Server and Create a New lotus notes user.
>
Function New-DominoUserRegistration {
[cmdletbinding()]
param (
[parameter(Position=0,Mandatory=$true,ValueFromPipeline=$True)][string]$lastname,
[parameter(Position=1,Mandatory=$true,ValueFromPipeline=$True)][string]$Useridfile,
[parameter(Position=2,Mandatory=$true,ValueFromPipeline=$True)][string]$mailserver,
[parameter(Position=3,Mandatory=$true,ValueFromPipeline=$True)][string]$firstname,
[parameter(Position=4,Mandatory=$false,ValueFromPipeline=$True)][string]$middle,
[parameter(Position=5,Mandatory=$true,ValueFromPipeline=$True)][string]$certpw,
[parameter(Position=6,Mandatory=$true,ValueFromPipeline=$True)][string]$location,
[parameter(Position=7,Mandatory=$true,ValueFromPipeline=$True)][string]$comment,
[parameter(Position=8,Mandatory=$true,ValueFromPipeline=$True)][string]$maildbpath,
[parameter(Position=9,Mandatory=$true,ValueFromPipeline=$True)][string]$fwddomain,
[parameter(Position=10,Mandatory=$true,ValueFromPipeline=$True)][string]$userpw,
[parameter(Position=11,Mandatory=$true,ValueFromPipeline=$True)][int]$usertype,
[parameter(Position=12,Mandatory=$true,ValueFromPipeline=$True)][string]$ShortName
)
cls
# Create Lotus Notes Object
$DomSession = New-Object -ComObject Lotus.NotesSession
# Initialize Lotus Notes Object
# "It'll use your open notes session and authentication Details"
$DomSession.Initialize()
# Use Method from Objects returned in variable $domsession one of which is CreateAdministrationProcess which
# takes a Server as input
$adminProcess = $Domsession.CreateRegistration()
$expiration = (Get-Date).adddays(1095)
$adminprocess.certifieridfile="C:\Program Files (x86)\IBM\Lotus\Notes\Data\ids\cert.id"
$adminprocess.Expiration =$expiration
#$adminprocess.RegistrationLog ="C:\program files (x86)\IBM\lotus\notes\data\reglog.nsf"
#[int]$adminProcess.MinPasswordLength=5
$adminprocess.RegistrationServer="Dom-01/smallhome"
$adminprocess.UpdateAddressBook=$true
$adminProcess.GroupList="Test4"
#$adminProcess.CreateMailDb=$true
#[int]$adminProcess.MailQuotaSizeLimit="100"
#[int]$adminProcess.MailQuotaWarningThreshold="90"
$adminProcess.PolicyName="/Registration_Settings"
$adminProcess.ShortName=$ShortName
[int]$adminProcess.MailOwnerAccess=2
$adminProcess.MailACLManager="LocalDomainAdmins"
$adminProcess.MailInternetAddress="$ShortName"+"#smallhome.local"
$adminProcess.MailTemplateName="Mail85.ntf"
$Notesid=$adminprocess.RegisterNewUser($lastname,$Useridfile,$mailserver,$firstname,$middle,$certpw,$location,$comment,$maildbpath,$fwddomain,$userpw,$usertype)
}
New-DominoUserRegistration "archer" "C:\Program Files (x86)\IBM\Lotus\Notes\Data\ids\people\barcher.id" "CN=Dom-01/O=Smallhome" "basil" "" "swindon" "Work" "comment" "mail\barcher" " " "password" 176 "barcher"
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/2Wamq.png
I now have an answer for this, this came from someone else on another board: the line [parameter(Position=9,Mandatory=$true,ValueFromPipeline=$True)][string]$fwddomain,
Needed to have [AllowEmptyString()] inserted before [string]$fwddomain, and the input field was " " and needed to be "". It appears the $fwddomain has an impact on the internal email address name ie: 'bob patz/smallhome'.
I have tested this and it shows up in the people view and also I can now send emails to other users and ones self!
Problem solved.
Regards
Mark

Using vbscript objects for web elements in UFT

Right now, every time I want to interact with a web element using vbscript & uft, I do this:
.WebButton("xpath:=//div[#id='controls']/button[text()='Load Game']").something
.WebButton("xpath:=//div[#id='controls']/button[text()='Load Game']").something_else
.WebButton("xpath:=//div[#id='controls']/button[text()='Load Game']").another_thing
Instead of this cumbersome way, can I do this with vbscript & uft:
Object x = .WebButton("xpath:=//div[#id='controls']/button[text()='Load Game']")
x.something
x.something_else
x.another_thing
Is this possible/easy in vbscript ? If not, then why ?
I accidentally got an answer here. The solution is not exactly what I was expecting, but it is close to what I need. I was using static programming. I should be using dynamic programming instead.
Dynamic descriptive programming
'Launch gmail
systemutil.Run "iexplore.exe","http:\\www.gmail.com"
'Descriptive object to identify Browser with a particular title
Set Dbrowser=description.Create
Dbrowser("micclass").value="Browser"
Dbrowser("title").value="Gmail: Email from Google"
'Descriptive object to identify Web page with a particular title
Set Dpage=description.Create
Dpage("micclass").value="Page"
Dpage("title").value="Gmail: Email from Google"
'Descriptive object to identify a particular Web Button
Set Dbutton=description.Create
Dbutton("micclass").value="WebButton"
Dbutton("name").value="Sign in"
'Descriptive object to identify Web Text Box
Set Dedit=description.Create
Dedit("micclass").value="WebEdit"
Dedit("name").value="Email"
'wait till browser loads
Browser(Dbrowser).Page(Dpage).Sync
' Enter Email id in Username Field
Browser(Dbrowser).Page(Dpage).WebEdit(Dedit).Set "qtpworld.com"
Dedit("name").value="Passwd"
'Enter password in Passowrd Field
Browser(Dbrowser).Page(Dpage).WebEdit(Dedit).Set "qtp"
'Cick on the Sign In Button
Browser(Dbrowser).Page(Dpage).WebButton(Dbutton).Click
Static descriptive programming:
'Username="qtpworld.com"
'Password="qtp"
'*****************************Login to gmail account using Static descriptive Programing ******************************
'Launch gmail
systemutil.Run "iexplore.exe","http:\\www.gmail.com"
'Assign object property value to a variable pwd
pwd="Passwd"
'Wait till browser loads
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").Sync
' Enter Email id in Username Field
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebEdit("name:=Email").Set "qtpworld.com"
'Enter password in Passowrd Field
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebEdit("name:=" & pwd).Set "qtp"
'Cick on the Sign In Button
Browser("title:=Gmail: Email from Google").Page("title:=Gmail: Email from Google").WebButton("name:=Sign in").Click

Creating Outlook Contacts via Applescript

I'm trying to create an Outlook contact via Applescript. The script looks like this:
tell application "Microsoft Outlook" to make new contact with properties {first name:"test1", last name:"test2", email addresses:{{address:"work#mywork.com", type:work}, {address:"home#myhome.com", type:home}}}
The Outlook dictionary tells me that I got the class name ("contact") and the field names right. But upon saving the script I'm told: expected class name, but got property and the first "name" is highlighted. Strangely enough this error goes away if I remove the space between "first" and "name" (and "last" and "name").
Then I can save it, but upon executing I get this:
error "The variable „contact“ is not defined." number -2753 from "contact" (my translation, the original error message is in german). I'm using Outlook 2011 (v14.3.9 on Mavericks). What might be up there?
Your script works. Try looking somewhere else in the script. Paste the snippet above into a new script and test it yourself.

Flex 4 coltware airxmail - send vCal appointment

I am using coltware.airxmail to send emails from my Flex app.
I would like to send VCalendar appointment files generated from Flex straight to Outlook so they are opened in the Calender view. I am able to send the VCal files as an attachment on an email, however, these are not "auto-opened" in Outlook Calendar, which requires the user to double click on the file.
I have been trying to set the content type of the mail to "text/x-vCalendar", and pass in a byte array containing the VCal file, however, no joy. The vCal arrives as a .txt attachment to an empty email!
I wonder if anyone has had previous experience with this kit, or can suggest any pointers?
Or even suggest another component they have used to send VCal files straight to outlook, from ActionScript?
Here's my sample code (DEMO CODE VERY MESSY JUST TO GET POINT ACROSS):
var sender:SMTPSender = new SMTPSender();
// Set the from / to / host / port values here
var contentType:ContentType = new ContentType();
contentType.setMainType("text/x-vCalendar");
var message:MimeMessage = new MimeMessage(contentType,"UTF-8");
var file:File = File.desktopDirectory.resolvePath("vcal.vcs");
file.addEventListener(Event.COMPLETE,
function(ev:Event):void {
message.addRawContent(file.data);
sender.send(message);
sender.close();
});
file.load();
Hopefully I can achieve this using the coltware component. There's nothing on their site about using these methods, although the API guide is very incomplete - just "basic usage"... http://code.google.com/p/airxmail/wiki/HowToUseAPI
Did you try using a different content type, such as "text/calendar"? see here: http://weblogs.asp.net/bradvincent/archive/2008/01/16/creating-vcalendars-programmatically.aspx

Send Email Using Classic ASP with an Embeded Image

i am making NewsLetter using the wysiwyg Editor.. it allows me to upload the Image Path
and Image Path is stored in the Upload Directory..
Not When i retrieve that Image using it works in website..
the editor's value is stored in database
example
<br> hi
<img src="upload/acb.gif">
<br>
Hello
i am sending Email and the detail of this email is received from database
and this detail is sent to visitor
he is gettion all text value but not able to see Image
so suggest me what to do..?
If you are sending emails using CDOSYS.Message, you can easily send a complete web page with embedded images using the Message.CreateMHTMLBody(url) method.
Dim Message
Set Message = CreateObject("CDOSYS.Message")
Message.From = "from#email.org"
Message.To = "to#email.org"
Message.CreateMTHMLBody "http://yourserver.org/email.html"
Message.Send()
I recently cleaned up some code I had lying around to do this and slapped it online as a "Gist" on github; hope it still helps someone!
Sending embedded images with CDOSYS
This solution uses CDO (CDOSYS / CDO.Message), with "AddAttachment", and manually controlling the properties of the attachments to make them usable from within the email HTML and to avoid them appearing as separately-downloadable attachments in an email client.
The usage is very simple, just reference the images by a local path (on the computer the code is running on) in the HTML of the message, eg:
Some Image: <img src="<EMBEDDEDIMAGE:C:\test.jpeg>" />
The code will pick up the filename, add the file as an attachment to the message, and replace the relevant part of the message HTML with the internal reference to that attachment.
You would have to add site url to img source
<img src="http://www.sitename.com/upload/acb.gif"> as the user is not accessing your site from his mailbox.
For this you can set "http://www.sitename.com/" as a key in web.config and use in your mails.
This will resolve your problem for sure. Happy coding !!!!!!!!!!!!!
You would use AddRelatedBodyPart:
Embed Usage
Create Array and Pass it in "SendMail" Function as Parameter
Use in Email Body e.g.
Dim arrRelatedBodyPart(1)
arrRelatedBodyPart(0) = Server.MapPath(".") & "/images/barcode/bar_blk.gif"
arrRelatedBodyPart(1) = Server.MapPath(".") & "/images/barcode/bar_wht.gif"
Example
For i = 0 To UBound(arrRelatedBodyPart)
Dim strPathAndFileName: strPathAndFileName = arrRelatedBodyPart(i)
Dim strFileName: strFileName = GetFileName(arrRelatedBodyPart(i), "/")
'.AddRelatedBodyPart strPathAndFileName, strFileName, cdoRefTypeId
Set objCDOBodyPart = .AddRelatedBodyPart(strPathAndFileName, strFileName, 1)
objCDOBodyPart.Fields.Item("urn:schemas:mailheader:Content-ID") = "<" & strFileName & ">"
objCDOBodyPart.Fields.Update
Next
What are you using to send the email, I have had success in the past using AspEmail: http://www.aspemail.com/
It explains how to send embedded images here: http://www.aspemail.com/manual_04.html
However you will have to get it installed on your server, if you are using Shared hosting this might be a problem, if you are running your own server pretty easy!

Resources