Notification Mail without SMTP

  • Hi All,

    As per our requirement we are planning to capture the backup report through PowerShell, But I want to know how to get the report to mail without SMTP.

    I need query for mail notifications through PowerShell without SMTP

  • SMTP is the only way to send mail.

    you don't have to use YOUR smtp server, you can send via a gmail account, yahoo, but it is not possible to send an email without using the smtp protocol.

    you do not have to have SMTP set up locally, the server can be outside of your organization.

    You do not have to enable database mail either, which is really just stored SMTP credentials but it makes it much easier.

    try to explain what it is you are really trying to do, and why you think you cannot use SMTP.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • In that server SMTP is not enabled, We want to get the Backup report through mail using PowerShell without using SMTP. IS it possible

  • New persopn (6/28/2016)


    In that server SMTP is not enabled, We want to get the Backup report through mail using PowerShell without using SMTP. IS it possible

    Yes. Please see the post previous to yours.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • i get the sense you might be new to both powershell and SMTP;

    think it through...you cannot use a feature without using the service behind it, so you must use someones smtp mail server to send email.

    again, your organization does not have to have an SMTP mail server. if you are a lone developer, you don't run your own email service, you use someone else's mail server, whether it's company mail or gmail or whatever. that can go all the way up the food chain; lots of huge companies with tens of thousands of employees use Office365 (someone else's servers) instead of hosting their own.

    here's a nice example of sending an email via powershell. all you need is the details on the username/password/server.

    http://www.adminarsenal.com/admin-arsenal-blog/powershell-sending-email-with-gmail-example/

    ##############################################################################

    $From = "YourEmail@gmail.com"

    $To = "AnotherEmail@YourDomain.com"

    $Cc = "YourBoss@YourDomain.com"

    $Attachment = "C:\temp\Some random file.txt"

    $Subject = "Email Subject"

    $Body = "Insert body text here"

    $SMTPServer = "smtp.gmail.com"

    $SMTPPort = "587"

    Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `

    -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `

    -Credential (Get-Credential) -Attachments $Attachment

    ##############################################################################

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply