dineshkummarc / sendgrid-csharp

i liked the project to such an extent i also copied their issues to be solved. so as i can work on them.
MIT License
0 stars 0 forks source link

It doesn't support the proxy #5

Open dineshkummarc opened 11 years ago

dineshkummarc commented 11 years ago

Right now there is no way to set the proxy for the rest implementation. I Forked the repo and added that features, but could be nice to have it in here and nuget :)

dineshkummarc commented 11 years ago

theycallmeswift commented 2 months ago

Can you 1) outline your usecase for the proxy and 2) make a pull request so I can have a look at it. imperugo commented 2 months ago

I need to send an email from a server that doesn't have direct internet access. It means is use a proxy and I need to set a IWebProxy to the Restsharp, so client.Proxy = this.Proxy;

About the pull request not sure is a good idea, I refactored lot of code. It's easier to add the property memberlink commented 2 months ago

Any news on this issue? We have a server at a customer site with a proxy access to the internet only :-( Any idea when we can expect the Proxy property? Regards, Thomas imperugo commented 2 months ago

Thomas, in the mean time u can clone my fork here https://github.com/imperugo/sendgrid-csharp and us it. It works because I've it in production.

Cheers .u memberlink commented 2 months ago

Thanks u :-) It now works perfectly... imperugo commented 2 months ago

Cool! theycallmeswift commented 2 months ago

Still debating wether or not I want to introduce this functionality into the library. It seems like something that is very implementation specific and wouldn't really benefit 99% of our users. brandonmwest do you have thoughts on this? brandonmwest commented 2 months ago

I have no problem with adding proxy support; it won't have any detrimental affect. imperugo Can you link me to the relevant changes in your fork? theycallmeswift commented 2 months ago

brandonmwest hold off until you see me tomorrow. Let's talk this through a bit. imperugo commented 2 months ago

brandonmwest that's really simple.

class SendGridMail.Transport.Web I've added a property for the proxy

public IWebProxy Proxy { get; set; }

then in the Deliveri method I added this

if (this.Proxy != null) { client.Proxy = this.Proxy; }

That's all