C
C#2w ago
MainaJauro

Sending Email from C# Windows Form, Several Effort hasn't yielded any effort

BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
12 Replies
Thinker
Thinker2w ago
What language is this...? Also can you please send your code and not an rtf file $code
MODiX
MODiX2w ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
glhays
glhays2w ago
Try reviewing this it might help. https://phppot.com/php/send-email-localhost-php/
Phppot
Send Email from Localhost using PHP with SMTP and PHPMailer - Phppot
A PHP email script to send emails from the localhost server by using PHPMailer with SMTP.
MainaJauro
MainaJauroOP2w ago
Thank You for your response, But I think you miss assimilate the info, I am using windows form, i wish to communicate with the PHP file directly from my windows form
glhays
glhays2w ago
Got it, but your code file said otherwise.
MainaJauro
MainaJauroOP2w ago
C# (Windows Form) I just did share the code, click on the link to have access to the code please
MainaJauro
MainaJauroOP2w ago
Great! this link will help 'https://paste.mod.gg/tqybhjdmlnlw/0'
BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
MainaJauro
MainaJauroOP2w ago
Thank you, I just did 'https://paste.mod.gg/tqybhjdmlnlw/0'
BlazeBin - tqybhjdmlnlw
A tool for sharing your source code with the world!
Jimmacle
Jimmacle2w ago
@MainaJauro what does PHP have to do with sending email from a windows form? there are more than adequate tools to send email directly from C# like SmtpClient or MailKit
MainaJauro
MainaJauroOP2w ago
I tried sending email using windows form, but not working, I guess due to some authentications of SMTP. So I think may be I can make a request to any HttpClient to communicate with my hosted PHP script passing some credentials so it can send the message using localhost. But that seems not working. My goal is just to send email using Windows form without using mail jet, send grid or mail gun
Jimmacle
Jimmacle2w ago
the short answer is you can't send arbitrary emails without using some kind of email sending service you will be blocked by any mainstream email server you try to send emails to from your own server in any case, trying to mix languages is never the solution and just makes your code needlessly complicated (and prevents us from being able to help, because this isn't a php server)
glhays
glhays2w ago
If you want to test for development, this is a easy tool to use. https://www.mailslurp.com/blog/a-guide-to-smtp4dev/
SMTP4Dev Tutorial - how to send emails
SMTP4Dev Tutorial: Test emails effortlessly with this open-source app to improve email quality. Learn when and how to use it plus its limitations now.

Did you find this page helpful?