Code: Select all
localTime = System::DateTime.UtcNow.AddMinutes(sys.GetTimezoneOffsetMinutes())
caller = req.Header.From.FromURI.User
sys.Email("user@gmail.com", "Incoming call", "from #{caller}, #{localTime}")
or possibly has leading prefix 1 like this"from 4161234567, 2/4/2015 2:15:29 AM"
"from 14161234567, 2/4/2015 2:15:29 AM"
I want to format CID by removing leading prefix 1 (if any) and inserting dashes, and also want to remove date and seconds and keep just hours and minutes, so the body of the email message will look like this:
Thanks"from 416-123-4567, 2:15 AM"