microsoft / azure-devops-engineering-extensions

AzureDevOps marketplace extension that contains various engineering oriented Pipeline tasks
MIT License
19 stars 20 forks source link

Add a "From" email address to email Report task #48

Open fahadash opened 3 years ago

fahadash commented 3 years ago

Currently there is no way to specify in the configuration what do you want email's from address to be. It assumes that the SMTP's username is the from address. But for SMTP service connections where username is not an actual email adddress (does not have @ or domain), this tasks fail at runtime.

This PR will Fix #42 by giving user an optional From email configuration field. If skipped, it will defer back to using SMTP's username. This has minimal impact.

ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

TripleEmcoder commented 3 years ago

Well, I tried, but it seems we need someone with true approving powers :)

fahadash commented 3 years ago

@TripleEmcoder I appreciate that. Until Microsoft decides to wake up and do something about it, I found a workaround. A powershell script that makes use of System.Net.Smtp to connect to your SMTP server and sends that email.

TripleEmcoder commented 3 years ago

Where do you get the content from? Does the plugin write it somewhere accessible? Could you share the PowerShell script for others to use?

Hopefully someone will get a few notifications now with our activity and find the time to merge the changes.

fahadash commented 3 years ago

Where do you get the content from? Does the plugin write it somewhere accessible? Could you share the PowerShell script for others to use?

Hopefully someone will get a few notifications now with our activity and find the time to merge the changes.

@TripleEmcoder Sorry for delayed response here is the script that I wrote

$EmailFrom = “no-reply@yourcompany.com”
$EmailTo = “recipients@yourcompany.com”
$Subject = “App Deployment Started”
$Body = “We are taking down the app to deploy the build <a href=`"https://dev.azure.com/Company/projectl/_traceability/runview/changes?currentRunId=$(Build.BuildId)`">$(Build.BuildNumber)</a>, Release $(Release.ReleaseId). ”
$SMTPServer = “smtp.server.com”
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("username", "password");
$mail = New-Object System.Net.Mail.Mailmessage $EmailFrom, $EmailTo, $Subject, $Body
$mail.IsBodyHtml = $true

$SMTPClient.Send($mail)
ksista-ahc commented 3 years ago

Any idea when this PR can be merged. There is a definite need to fix this extension @fahadash @microsoftopensource

xiuzhen1103 commented 2 years ago

Any update on this pull request approval?

ksista-ahc commented 2 years ago

@TripleEmcoder @ddeglin @devops-cafeto Could anyone of you approve the PR and merge it.

fahadash commented 2 years ago

@saikrishnav Could you merge this PR?

ksista-ahc commented 2 years ago

@saikrishnav Could you please approve this PR and unblock us... This plugin is a definite need for us

fahadash commented 2 years ago

@LeahSchwartz Could you help us out? We need these changes merged ASAP to unblock us.

Peadge commented 2 years ago

@LeahSchwartz or anyone else PLEASE can you approve the changes so this can be merged in, it's the ONLY extension that can email test results out from the Release pipeline.

fahadash commented 2 years ago

I have sent an email to opensource@microsoft.com asking for help. Hoping for the best.

Naweap commented 2 years ago

Any news on that PR ?

fahadash commented 2 years ago

I never received a response from Microsoft OpenSource to my email. I am going to try tweeting to their twitter handle, you guys try it too.

Naweap commented 2 years ago

I never received a response from Microsoft OpenSource to my email. I am going to try tweeting to their twitter handle, you guys try it too.

Alright, thanks for your answer, it will try it too. However, I don't want to be pessimistic, but it has been almost one year since they didn't release any new version of this extension. By the time this PR is merged and we see this improvement in prod, I think it's gonna take time.

dan-hoeger commented 1 year ago

Is there any update on this? we require the ability to specify the "From" address when using an AWS SMTP service.

asultan80 commented 1 year ago

@fahadash Can you remove the review request from @ddeglin ?

asultan80 commented 1 year ago

@saikrishnav Please, take a look and help to resolve this one. Thank you!

fahadash commented 1 year ago

I think we may have to call Microsoft PSS to get their attention into this.

fahadash commented 1 year ago

@ddeglin This PR is waiting on you again, could you look into this please?

fahadash commented 1 year ago

@saikrishnav Could you merge this PR please?

ZaafirDar commented 1 year ago

@fahadash Can we please get this PR merged, still running into this problem.

fahadash commented 1 year ago

Looks like we have lost @ddeglin , I am going to convert this to draft, that is probably going to remove the existing approvals.

fahadash commented 1 year ago

It turns out that we have to wait for a Build to occur before this PR can be merged.

ZaafirDar commented 1 year ago

@fahadash Any Idea how is build triggered? Should we expect any response on this?

fahadash commented 1 year ago

@saikrishnav Could you get the build 10.x check taken care of?

ZaafirDar commented 12 months ago

@saikrishnav can you help us with build (10.x) Check?