Unable to read emailable-report.html into the email via Jenkins - email

I am using below code in Pre-Script:
def reportPath = build.getWorkspace().child("PASSING COMPLETE PATH OF THE EMAILABLE-REPORT")
msg.setContent(reportPath.readToString(), "text/html");
But email does not contain anything. Can somebody tell me what I am doing wrong.
Note: I am receiving the email. Also I am adding emailable-report as an attachment on the email which I am successfully able to do but unable to add report as part of the body of the email.

Related

Cant able to find the link from email content of my mail-using robot -imap library

my email content below -
Hi example#gmail.com,
Please click on the link to confirm your registration, https://link here
here 2 links are there in email.-example#gmail.com,https:link here
i want to to automation of my activation email using robot -
here i tried to run the below code
Open Mailbox host=imap.gmail.com user=EXAMPLE#gmail.com password=PWD
${LATEST} = Wait For Email sender=SENDER#GMAIL.COM timeout=300
${parts} = Walk Multipart Email ${LATEST}
FOR ${i} IN RANGE ${parts}
Walk Multipart Email ${LATEST}
${content-type} = Get Multipart Content Type
Continue For Loop If '${content-type}' != 'text/html'
${payload} = Get Multipart Payload decode=True
Should Contain ${payload} EXAMPLE#gmail.com
after running the above code ,i got pass ,and in report ,i can see the email conetner shown above .
what i want is to fetch the activation link alone and click it .
which i failed many time .
please anyone help me to solve this.

Jenkins: Emails not being sent from email-ext

I'm trying to send emails from Jenkins using the groovy script. My problem is that emails are going to some distribution lists while they're not going to other DLs. Here is a code snippet:
emailext (
subject: subject,
body: content,
to: 'a.b#x.com, c.d#x.com, #d.e#y.com, #f.g#y.com'
)
The emails are being sent to the IDs a.b#x.com, c.d#x.com, #d.e#y.com but no one in #f.g#y.com gets the email.
I'm sure there's no spelling mistake or typo in my to list as when i open the email on outlook, i'm able to expand the #f.g#y.com to see all the members.
What am i missing out on?

Unknown URL getting inserted to email Body in salesforce

"http://cs23.salesforce.com/servlet/servlet.ImageServer?oid=00D190000001brI&esid=01918000000bcHs" gets inserted in email when it is Sent to any user. This URL has no relivience to any image/ doc in my SF org. Please help me to resolve this.
I got the issue fixed. Its due to Activity setting for HTML email history.if this is enabled then SF addes blank image to check if the html email is opened.

Code Igniter email attachment appears but content is empty

I'm using Code Igniter's email class to add an attachment to an email.
The attachment would appear however it's contents was always empty. I was able to verify (in the email source) that the attachment content is actually present (base64 encoded).
On the SO question linked, Torsten Arendrup answer was the solution which worked. I'm hoping to get some clarification as to why it works.
Codeigniter send email with attach file
In summary it seems that adding a new line after the 'Content-Transfer-Encoding: '(immediately before the attachment content is specified) fixes.
Is it simply that the email source is not formatted properly and bumping the content to the next line fixes this? Or is this a hack which actually does something else?
Thanks

Liferay: how do I add verication URL to new account e-mail

(Using Liferay 6.1.0-CE-GA1.) I have written my own user registration portlet. When I UserLocalServiceUtil.addUser(...), the sendEmail parameter is true and, indeed, it sends the Account Verification Notification.
I've modified that notification by adding this line to it:
Please verify your email address for [$PORTAL_URL$] by clicking this link: [$EMAIL_VERIFICATION_URL$].
Unfortunately the e-mail it sends contains this line, literally:
Please verify your email address for xxx by clicking this link: [$EMAIL_VERIFICATION_URL$].
Is there any way to make this work? I want to send one e-mail with the verification code. My program flow requires it.
Thank you.
You should use this after you added the account in the action
ServiceContext serv = ServiceContextFactory.getInstance(request);
UserLocalServiceUtil.sendEmailAddressVerification(user1, user1.getEmailAddress(), serv);