Mailx / sendmail problem

Hi All,
We are having some problems with mailing process. Some times the mails are blocked and issued after hours of delay.
Also we have seen that same emails are issued multiple times and customers get 2/3 emails for same issue.
I'm talking about solaris 2.6 on sparc. Any help will be appreciated.
Javed

You need to be a bit more specific.
What version of sendmail are you using ?
What does your sendmail queue look like ? Are there emails stuck in it ?
The problem might not be your sendmail server at all but remote servers. The sendmail queue will tell you why an email is queued up assuming it has a problem.
Just run: /usr/lib/sendmail -bp
This will display your sendmail queue and let you know what's in it and why.

Similar Messages

  • Slight PHP Sendmail Problem

    Hello there,
    I have managed to find a send-mail script in PHP in order for
    site users to be able to send me their comments, questions, etc.
    However, I receive the email but I only receive what the user has
    selected in the drop down menu, I can change this to any of the
    fields but my problem is, I'm wanting it to email me ALL the
    fields, not just one. I've attached the following PHP code below.
    I'd be very grateful if anyone could help.
    Regards,
    Kristopher (UK).

    <?
    $message = "An email sez: ";
    foreach($_POST as $key => $value) {
    $message .= $key . ": " . $value;
    mail( "[email protected]", "Feedback Form Results",
    $message, "From: $email" );
    header( "Location:
    http://www.google.co.uk" );
    ?>
    Be aware that your use of sendmail without any security
    measures makes you a
    juicy target for email injection techniques -
    http://www.nyphp.org/phundamentals/email_header_injection.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Coxdabd" <[email protected]> wrote in
    message
    news:gb967k$9qr$[email protected]..
    > Hello there,
    >
    > I have managed to find a send-mail script in PHP in
    order for site users
    > to be
    > able to send me their comments, questions, etc. However,
    I receive the
    > email
    > but I only receive what the user has selected in the
    drop down menu, I can
    > change this to any of the fields but my problem is, I'm
    wanting it to
    > email me
    > ALL the fields, not just one. I've attached the
    following PHP code below.
    >
    > I'd be very grateful if anyone could help.
    >
    > Regards,
    >
    > Kristopher (UK).
    >
    > <?
    > $name = $_REQUEST['name'] ;
    > $message = $_REQUEST['message'] ;
    > $select = $_REQUEST['select'] ;
    >
    > mail( "[email protected]", "Feedback Form
    Results",
    > $message, "From: $email" );
    > header( "Location:
    http://www.google.co.uk" );
    > ?>
    >

  • Regarding Sendmail problem

    We have developed an application wherein we have made use of Sendmail server.
    But mail is being delivered only from one and only domain(say, pqr.com) to a particular domain, say xyz.com. But we are not able to send the mail from yahoo/rediffmail or some other domains to that particular domain, xyz.com.
    Can someone please help me out in explaining what exactly might be the reason for the above problem.

    I am having exactly the same issue with WAS 5.1 Were you able to find a resolution?

  • Mailx giving problem

    Hi,
    When I am try to send mail with the following command:
    mailx -s " test mail " [email protected]
    I am getting the error as:
    1) It hangs
    2) Sometime it gives error like :
    collect: Cannot write ./dfl6JEDUDA020585 (bfcommit, uid=501, gid=51): Permission denied
    queueup: cannot create queue file ./qfl6JEDUDA020585, euid=501, fd=-1, fp=0x0: Permission denied
    ps -ef | grep mail gives following statements:
    root 2931 1 0 Jun28 ? 00:00:03 sendmail: accepting connections
    smmsp 2939 1 0 Jun28 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
    oracle 4419 4268 0 10:35 pts/0 00:00:00 grep mail
    Please advice how to proceed.

    http://www.google.com/search?sourceid=navclient&aq=t&ie=UTF-8&rls=GGLG,GGLG:2005-29,GGLG:en&q=%22queueup%3a+cannot+create+queue+file+%22+permission+denied

  • Sendmail problem following Solaris 8 upgrade

    Having upgraded to Solaris 8 a while ago I now notice that the email system no longer works and hasn't done so since the upgrade. The relevant message I receive in /var/adm/messages is as follows;
    May 27 08:55:26 old_spwks2 sendmail[248]: [ID 702911 mail.crit] My unqualified host name (old_spwks2) unknown; sleeping for retry
    May 27 08:56:26 old_spwks2 sendmail[248]: [ID 702911 mail.alert] unable to qualify my own domain name (old_spwks2) -- using short name
    May 27 08:56:26 old_spwks2 sendmail[248]: [ID 801593 mail.crit] NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 77: fileclass: cannot open /etc/mail/local-host-names: Group writable directory
    May 27 08:56:26 old_spwks2 sendmail[248]: [ID 801593 mail.crit] NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 472: fileclass: cannot open /etc/mail/trusted-users: Group writable directory
    Any help would be much appreciated

    "Solaris 8, Update 7" is the Operating Environment distribution from February 2002.
    It is otherwise reffered to as "Solaris 8 HW 2/02"
    http://sunsolve.sun.com/handbook_pub/Software/Solaris_Ref/So laris_8_2-02/index.html
    You must <u>install</u> the distribution, you cannot patch your way to get there.
    Your error message is telling you that you are not running a supported OS, for the Sun Java AS that you hope to run.
    If you have access to a computer with a CD burner drive, you can download the two disk images and create your own set of media.
    http://sunsolve.sun.com/handbook_pub/Software/
    Again, you will need to install that OS.
    Build your computer all over again.

  • JavaMail code bug or Solaris sendmail problem?

    Hi all,
    i write a java app to send out the email using SMTP sendmail.
    I set the a list of emails (yahoo, gmail, hotmail, lotus notes etc) into BCC field only and left the To Field and CC Field empty.
    Then i set the subject and the email content and send out the emails.
    Here are the 2 scenarios happened based on different SMTP server:
    1. using Ms Exchange Server
    as expected, the email recepients see the To and CC field empty, and no other email addresses can be seen from the email. this behaviour is consistent for all email clients.
    2. using solaris sendmail
    using same java code, different behaviours encountered depended on the email clients:
    a) using yahoo, gmail... all bcc list emails are displayed in To Field!!
    b) using lotus note ...displayed 1 email address (get from BCC list) makes it look like a spam!
    c) using hotmail and Ms Outlook 2003, no issue, To and CC field are empty, and no email addresses are exposed.
    Can any java experts please advise what is actually happening here?
    To be thorough, i will attach my java code that send out the email here :)
    Thanks!!!!
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    import java.util.Properties;
    import java.util.PropertyResourceBundle;
    import java.util.ResourceBundle;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.sql.DataSource;
    import org.apache.commons.dbcp.BasicDataSource;
    public class EmailBlaster {
         private final String SQL = "my_sql_statement here" +
         public final String PROPERTIES_FILE = "emailblaster"; //my prop file
         private ResourceBundle props;
         private BasicDataSource sourceDs;
         private ResourceBundle getProps() {
              if (props==null) {
                   props = PropertyResourceBundle.getBundle(PROPERTIES_FILE);
              return props;
         private void resetProps() {
              props = null;
         public void sendEmail() {
              String msg = getMsg();
              List recipients = new ArrayList();
              recipients.add("[email protected]");
              recipients.add("[email protected]");
              recipients.add("anyMsOulookBasedEmail@Xxxxxxxx");
              recipients.add("[email protected]");
              String sender = getProps().getString("email.sender");
                   try {
                        postMail(list, sender, msg);
                   } catch (Exception ex) {
                        System.out.println("Error while sending report email|ex: " + ex.getMessage());
                        ex.printStackTrace();
         public static void main (String [] args) {
              EmailBlaster obj = new EmailBlaster();
              System.out.println("Start emailing -- " + new Date());
              obj.sendEmail();
              System.out.println("Done -- " + new Date());
              obj.resetProps();
         * This code copy from ReportGenerator.java
         * @param recipients
         * @param from
         * @param attachments
         * @throws MessagingException
    private void postMail(List recipients, String from, String msg) throws MessagingException
    boolean debug = false;
    //Set the host smtp address
    Properties props = new Properties();
    String incomingServer = getProps().getString("email.smtp.incoming.server");
    String outgoingServer = getProps().getString("email.smtp.outgoing.server");//i test use MsExchange Server and SendMail Solaris
    props.put(incomingServer, outgoingServer);
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(debug);
    //Define message
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    InternetAddress[] addressTo = new InternetAddress[recipients.size()];
    for (int i = 0; i < recipients.size(); i++)
    addressTo[i] = new InternetAddress((String)recipients.get(i));
    message.setRecipients(Message.RecipientType.BCC, addressTo);
    message.setSubject(getProps().getString("email.subject"));
    message.setContent(msg, "text/html");
    Transport.send(message);
         private String getMsg() {
              String msg="";
              msg = getProps().getString("email.msg");
              return msg;
    }

    Hi bshannon
    Thanks for the reply :)
    there was an accident happened that exposed the users' email addresses using the above java code and sendmail. that is, our code pull a list of users' email addresses, put it into BCC list, and left TO and CC list empty, and then send it using sendmail as SMTP
    probably I didnt make myself clear :)
    the most important thing now is to understand why the above scenario happen based on the above java code and sendmail SMTP. my head will be rolling down the road if I cant find any satisfy explanation ^_^"
    any kind soul that can help to run/test the similar code as above in other SMTP servers (especially sendmail solaris smtp) will be highly regarded
    Thanks!

  • Sendmail problem

    Hey all, seems there's an issue with the airport express I have set up; my g4 powerbook is using its network and for some reason the email program I use (thunderbird) can't send out mail. It can receive mail, but hangs connecting to the smtp server. Once I've gotten onto other wireless networks it works fine with the same settings. Any ideas? Thanks!

    The problem is that SMTP servers by default do not use any authentication so anyone can use them. The obvious flaw in this is that spammers can use any SMTP server they like to hit you with their junk. So SMTP servers had to be locked down to reduce the abuse of these servers.
    The ISP's lock down their servers to only allow unauthenticated connections from their subscribers who are linked to their network. If you travel you need to use an SMTP server that has authentication options. That way the SMTP server will send mail for you no matter what network you are on. Ask your ISP if they allow remote authenticated use of their SMTP server.

  • I'M WITH STUPID! sendmail.cfm hack not working...

    Hi, I'm a lonely, stupid, ignorant person whom is not interested in code or building a sendmail page. I can however, build a frameset in DreamWeaver and up load its page's and content onto the net using filezilla and a webhosting client, I can even build my own btn bar with a get URL content mainframe code...arrrggghh. But then stupid comes back and say's, "use a 2004 mx flash tutorial from the 2004 Flash MX bible, and insert its SWF file from a Flash FLA  from chapter 30" and guess what...It doe's not work! ooohHa! And a little horn apears, as a saintly brow turn's into a not so saintly V shaped furrow. Please, can anyone help, stupid?
    I need to know how to alter the sendmail code, to send email's to [email protected] from the contact page on the http://www.pizzapal.co.uk website.
    function sendComments() {
    var sender:LoadVars = new LoadVars();
    var responder:LoadVars = new LoadVars();
    responder.onLoad = function(success){
      if (success) {
       _global.serverTime = this.timeDate;
       _root.gotoAndStop("output");
      } else {
       _root.gotoAndStop("error");
    sender.fromEmail = fromEmail_txt.text;
    sender.fromName = fromName_txt.text;
    sender.body = comments_txt.text;
    sender.sendAndLoad("http://[email protected] ", responder, "POST");
    _root.gotoAndStop("wait");
    this._lockroot = true;
    Right? Wrong?  Plus, what file do upload onto my server to accomapy the SWF sendmail.cfm page.
    Many thanks for reading and I hope it was entertaining because actors like me and Joey are important to.
    The sendmail_cfm.swf is attached.

    Please can anyone remove the report abuse icon because I cannot continue with this thread.
    Sabby76
    Thanks Ross
    I accidentally deleted a content folder from the frameset and that meant due to low practical skills in Dreamweaver, I went ahead a deleted the whole site instend of renaming a secondary copy. I then built the frameset up again this evening after going for a walk to cool down, it was one way geetting to know Dreamweaver a little better. The time gave also an oppotunity to think about the sendmail problem and thing's were clearing on the return home, so I sat down a dragged in some new file's from the tutorial C.D and started again, with a copy paste from your email. Thank's once again, it was your advise that truned my attention to the sendmail.cfm, which incidentally, I had over looked on the first attempt's to get the contact's page running. It still doe's not return mail though, so I thought might like to have a look at the script from the sendmail.cfm file... {
    I hope I carried out your advice correctly and notice also the server port, which I have changed from 23 to 21 and the the servers I.D also was scrubbed in favor to my hosting clients. I've sent then a question on this subject, regarding your question on weather or not their server run's cfm, I will inform of their answer and keep trying anyway.
    sabby76
    Date: Wed, 23 Sep 2009 12:48:52 -0600
    From: [email protected]
    To: [email protected]
    Subject: I'M WITH STUPID! sendmail.cfm hack not working...
    Your code should look like this:
    function sendComments() {
    var sender:LoadVars = new LoadVars();
    var responder:LoadVars = new LoadVars();
    var scriptURL:String = "http://www.pizzapal.co.uk/sendmail.cfm";
    responder.onLoad = function(success){
      if (success) {
       _global.serverTime = this.timeDate;
       _root.gotoAndStop("output");
      } else {
       _root.gotoAndStop("error");
    sender.fromEmail = fromEmail_txt.text;
    sender.fromName = fromName_txt.text;
    sender.body = comments_txt.text;
    sender.sendAndLoad(scriptURL, responder, "POST");
    _root.gotoAndStop("wait");
    this._lockroot = true;
    And then, open the sendmail.cfm page in Dreamweaver or another text editor, find the email address the script is sending to (I am assuming this is part of the tutorial in the book as well...) and change it to your mailto:[email protected]
    Upload the SWF, and the CFM and it should work.... assuming your web host server runs coldfusion scripting.
    >

  • Help Needed with Apple Script

    I need a little help with Apple Script. I have been using a script for several months now, and all of a sudden it just stopped working. Here's the script"
    ============
    with timeout of 9999 seconds
    tell application "Finder"
    activate
    (* copy target file to another disk - to create a backup *)
    duplicate file "Daily.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
    (* copy a 2nd target file to another disk - to create a backup *)
    duplicate file "Personal.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
    (* now copy the 2nd target file to my iDisk *)
    duplicate file "Personal.dmg" of folder "Data Backup-Daily" of disk "MacHD 1" to folder "Documents" of disk "xxxxxx" replacing yes
    end tell
    end timeout
    ============
    In the above script, xxxxxx represents the name of my iDisk that is mounted in the Finder.
    Here's my issue - the above script worked fine until just recently. However, now the first two steps work fine, but I get this error message while trying to copy the file to my iDisk:
    "The operation could not be completed because some items had to be skipped. 'Personal.dmg'"
    Does anyone have any ideas on how I can fix this? I'm wondering if Mac OS 10.4.5 might be the culprit since this problem seems to have occurred shortly after I upgraded???
    Thanks,
    -AstraPoint

    Hi,
    Assumptions :-
    uuencode command exits
    mailx command exits
    File name is "vas.txt".
    Mail id is "[email protected]"
    # START OF SCRIPT
    #!/bin/ksh
    vasFileName="$1"
    vasRecordsDirFile=/etl/dev/work/wellness/enrl_rej/records/${vasFileName}
    vasMetatdataDirFile=/etl/dev/work/wellness/enrl_rej/metadata/${vasFileName}
    vasHeaderDirFile=/etl/dev/work/wellness/enrl_rej/header/${vasFileName}
    vasHeaderRejDirFile=/etl/dev/work/wellness/enrl_rej/hdrrej/${vasFileName}
    vasFieldsDirFile=/etl/dev/work/wellness/enrl_rej/fields/${vasFileName}
    if [[ -e ${vasRecordsDirFile} ]]
    then
    uuencode ${vasRecordsDirFile} ${vasRecordsDirFile} | mailx -s "process complete and attached are the rejected records" [email protected]
    elif [[ -e ${vasMetatdataDirFile} ]]
    then
    uuencode ${vasMetatdataDirFile} ${vasMetatdataDirFile} | mailx -s "Metadata Mismatch no of fields in detail didn't match" [email protected]
    elif [[ -e ${vasHeaderDirFile} ]]
    then
    uuencode ${vasHeaderDirFile} ${vasHeaderDirFile} | mailx -s "Problem with header file - File Rejected" [email protected]
    elif [[ -e ${vasHeaderRejDirFile} ]]
    then
    uuencode ${vasHeaderRejDirFile} ${vasHeaderRejDirFile} | mailx -s "the Percentage of rejects more than 3 percent File rejected" [email protected]
    elif [[ -e ${vasFieldsDirFile} ]]
    then
    uuencode ${vasFieldsDirFile} ${vasFieldsDirFile} | mailx -s "The header and detail count didn't match File rejected" [email protected]
    else
    echo "File doesn't exist in any of the directories mentioned."
    fi
    # END
    Vijay Bheemineni.

  • Help needed with the script

    Hi all, I am a novice in scripting...
    Could someone help me writing script for the following....
    Assume that there are 5 folders
    1 /etl/dev/work/wellness/enrl_rej/records
    2 /etl/dev/work/wellness/enrl_rej/metadata
    3 /etl/dev/work/wellness/enrl_rej/header
    4 /etl/dev/work/wellness/enrl_rej/hdrrej
    5 /etl/dev/work/wellness/enrl_rej/fields
    need to check if there is a file created in any of the above five locations,
    If the file Exists in Location 1 then
    send message with Subject 'process complete and attached are the rejected records' with the file in that folder as attachemt
    if file exists in Location 2 then
    send message with Subject 'Metadata Mismatch no of fields in detail didn't match' With the file in that folder as attachment
    If file exists in 3 then
    send message with Subject 'Problem with header file - File Rejected' With the file in that folder as attachment
    If file exists in 4 then
    Send message with subject 'the Percentage of rejects more than 3 percent File rejected' With the file in that folder as attachment
    If file exists in 5 then
    Send message with subject 'The header and detail count didn't match File rejected' With the file in that folder as attachment
    Thanks in advance !!!

    Hi,
    Assumptions :-
    uuencode command exits
    mailx command exits
    File name is "vas.txt".
    Mail id is "[email protected]"
    # START OF SCRIPT
    #!/bin/ksh
    vasFileName="$1"
    vasRecordsDirFile=/etl/dev/work/wellness/enrl_rej/records/${vasFileName}
    vasMetatdataDirFile=/etl/dev/work/wellness/enrl_rej/metadata/${vasFileName}
    vasHeaderDirFile=/etl/dev/work/wellness/enrl_rej/header/${vasFileName}
    vasHeaderRejDirFile=/etl/dev/work/wellness/enrl_rej/hdrrej/${vasFileName}
    vasFieldsDirFile=/etl/dev/work/wellness/enrl_rej/fields/${vasFileName}
    if [[ -e ${vasRecordsDirFile} ]]
    then
    uuencode ${vasRecordsDirFile} ${vasRecordsDirFile} | mailx -s "process complete and attached are the rejected records" [email protected]
    elif [[ -e ${vasMetatdataDirFile} ]]
    then
    uuencode ${vasMetatdataDirFile} ${vasMetatdataDirFile} | mailx -s "Metadata Mismatch no of fields in detail didn't match" [email protected]
    elif [[ -e ${vasHeaderDirFile} ]]
    then
    uuencode ${vasHeaderDirFile} ${vasHeaderDirFile} | mailx -s "Problem with header file - File Rejected" [email protected]
    elif [[ -e ${vasHeaderRejDirFile} ]]
    then
    uuencode ${vasHeaderRejDirFile} ${vasHeaderRejDirFile} | mailx -s "the Percentage of rejects more than 3 percent File rejected" [email protected]
    elif [[ -e ${vasFieldsDirFile} ]]
    then
    uuencode ${vasFieldsDirFile} ${vasFieldsDirFile} | mailx -s "The header and detail count didn't match File rejected" [email protected]
    else
    echo "File doesn't exist in any of the directories mentioned."
    fi
    # END
    Vijay Bheemineni.

  • Send Mail timed out

    Ok, so I'm relatively new to OS x server but I consistantly am having a sendmail problem. I can receive mail and send mail "most" of the time. But, I do get errors when sending to blackberry's, hotmail, and essentially random domains. What I get are conection timed out error. Heres an example from my SMTP log :
    Nov 9 19:36:56 (servername) postfix/smtp[21684]: connect to mail.senecac.on.ca[142.204.1.36]: Operation timed out (port 25)
    First of all, anyone have any comments or solutions?
    Second On my router I have doubled/triple checked that my port 25 is open. I can send send mail to some domains with no fail. When i send to my blackberry i get log data like this :
    Nov 9 19:31:02 Winterswarmth postfix/smtp[21627]: A566E3F45C: to=<[email protected]>, relay=none, delay=30, status=deferred (connect to mail.senecac.on.ca[142.204.1.36]: Operation timed out)
    Nov 9 19:31:02 Winterswarmth postfix/smtp[21628]: connect to mx1.rog.mail.yahoo.com[67.28.113.16]: Operation timed out (port 25)
    Nov 9 19:31:32 Winterswarmth postfix/smtp[21628]: connect to mx1.rog.mail.yahoo.com[64.156.215.23]: Operation timed out (port 25)
    Nov 9 19:32:02 Winterswarmth postfix/smtp[21628]: connect to mx2.rog.mail.yahoo.com[66.94.225.172]: Operation timed out (port 25)
    Nov 9 19:32:03 Winterswarmth postfix/smtp[21628]: A566E3F45C: to=<[email protected]>, relay=mx2.rog.mail.yahoo.com[206.190.37.6], delay=91, status=sent (250 ok dirdel)
    In the end it send, it just takes several attempts.
    Any help would be appreciated.

    I think you are confusing things here.
    While you can change the port used for submission from your mail clients to your mail server, you cannot (should not) change the outgoing port for your smtp server. All mail servers expect incoming traffic on port 25, thus using port 587 will not get your mail delivered (it will go through your firewall, but that's about it).
    If your mail server (not client) is behind a firewall with port 25 blocked, there is no way it can send mail to outside domains. So either get your ISP to let port 25 through for your server or use your ISP's smpt server to send mail (this can be done directly, or through your mail server relaying through your ISPs server).

  • Domains and Sitecontrol

    I am looking for help with a sendmail problem on my site and do not really know where to go for help. Is there online assistance available through a forum or tech support?

    terry6 wrote:
    I am looking for help with a sendmail problem on my site and do not really know where to go for help. Is there online assistance available through a forum or tech support?
    Verizon blocks port 25 for residential outbound connections. All mail must go through their servers. So SMPT straight to the web is not going to work. You may be able to set ther server up as a forwarder. Depending on what your site is trying to do, you may be able to use CDO_SYS. But Verizon has becone very restrictive regarding scripting and what can be don wit a residential account.
    I have used this script as part of a program that reads text reports that are dumped to a file through a scheduler. Uses someone elses server. Verizon's. Why are you running sendmail on a residential connections. Sendmail is a SMPT server application which violates the TOS.
    File Name. sendRPT.vbs
    'It does work on Vista, Windows 7, 2003 and should work fine on 2008 with no SMTP server running.
    'Remote server works and has been proven with authentication though Verizon.'
       ' Sends email from remote SMTP service using CDO_SYS objects
        ' Manually define server information in define server section.
       ' Usage:
       '   sendRPT -t <to> -f <from> -s "<subject>" -r "<Report file name & path>"
       '   sendRPT [-help|-?]
       Option Explicit
       On Error Resume Next
       Dim objSendMail, oArgs, ArgNum
       Dim strTo, strFrom, strSubject, strBody, strRPT
       ' Set up command line arguments.
       Set oArgs = WScript.Arguments
       ArgNum = 0
       While ArgNum < oArgs.Count
          Select Case LCase(oArgs(ArgNum))
             Case "-to","-t":
                ArgNum = ArgNum + 1
                strTo = oArgs(ArgNum)
             Case "-from","-f":
                ArgNum = ArgNum + 1
                strFrom = oArgs(ArgNum)
             Case "-subject","-s":
                ArgNum = ArgNum + 1
                strSubject = oArgs(ArgNum)
             Case "-RPT","-r":
                ArgNum = ArgNum + 1
                strRPT = oArgs(ArgNum)
             Case "-help","-?":
                Call DisplayUsage
             Case Else:
                Call DisplayUsage
          End Select
          ArgNum = ArgNum + 1
       Wend
       If oArgs.Count=0 Or strTo="" Or strFrom="" Or _
             strSubject="" Or strRPT="" Then
          Call DisplayUsage
       Else
    ' This line calls the ReadFile() function to read the page contents.
    strBody = ReadFile(strRPT)
    ' This function opens a file and returns the contents of the file.
    Function ReadFile(txtFile)
     Dim txtTemp, objFS, objFL
     Set objFS = CreateObject("Scripting.FileSystemObject")
     Set objFL = objFS.OpenTextFile(txtFile)
     Do While Not objFL.AtEndOfStream
      txtTemp = txtTemp & objFL.ReadLine
      txtTemp = txtTemp & vbCrLf
     Loop 
     objFL.Close
     Set objFS = Nothing
     ReadFile = txtTemp
    End Function
     Set ObjSendMail = CreateObject("CDO.Message")
    'This section provides the configuration information for the remote SMTP server.
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")= "outgoing.verizon.net"
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
    If your server requires outgoing authentication uncomment the lines below and use a valid email address and password.
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername")="[email protected]"
    ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="Password"
    ObjSendMail.Configuration.Fields.Update
    'End remote SMTP server configuration section==
    ObjSendMail.To = strTo
    ObjSendMail.Subject = strSubject
    ObjSendMail.From = strFrom
    ObjSendMail.TextBody = strBody
    ObjSendMail.Send
    Set ObjSendMail = Nothing
       End If
       ' Display the usage for this script
       Sub DisplayUsage
          WScript.Echo "Usage:"
          WScript.Echo "  cscript sendRPT.vbs -t <to address> -f <from address> -s " & _
             Chr(34) & "<subject>" & Chr(34) & " -r " & Chr(34) & _
             "<Report file>" & Chr(34)
          WScript.Echo "  cscript sendRPT.vbs [-help|-?]"
          WScript.Echo ""
          WSCript.Quit
       End Sub

  • Solaris 9 sendmail (8.12.10) configuration problem

    Hi,
    I have a problem with sendmail 8.12.10 on Solaris 9. I generate my sendmail.cf file using m4 *.mc files which adds the genericstable and masquerading features etc.
    I use the genericstable to rewrite emails from certain senders on the Solaris server to another address; eg.
    root [email protected]
    This way system emails sent by the root account will appear to the receipient as coming from [email protected] and replies to these emails (including mail bounces) will go the local Sys Admins.
    With Solaris 9's sendmail (8.12.10) the genericstable sender address rewriting no longer works. Sendmail (8.11.3) on Solaris 8 using a sendmail.cf file generated from the same sendmail.mc source works fine.
    The strange things is that in sendmail rule test mode (sendmail -bt -d21.4 -d21.12 -d31.2 -d0.4) entering the ruleset
    3,1,EnvFromSMTP,4 rootprocesses the generictable and rewrites the sender address and returns:
    final returns: UnixTeam @ domain . com
    Can any sendmail GURUS out there please give me a clue what I'm missing or what needs to be changed in my sendmail.mc for Sendmail version 8.12.x??
    Thanks.

    How about issues with sendmail 8.12.12 ?
    When I setup sendmail.mc for genericstable, see below:
    divert(0)dnl
    VERSIONID(`@(#)subsidiary.mc 1.10 (Sun) 12/14/00')
    OSTYPE(`solaris8')dnl
    define(`ALIAS_FILE',`/etc/mail/aliases')dnl
    DOMAIN(`solaris-generic')dnl
    FEATURE(`msp', `[firewall.com]')dnl
    dnl
    define(`SMART_HOST',`firewall.com')dnl
    FEATURE(masquerade_envelope)dnl
    FEATURE(genericstable, `hash -o -T<TMPF> /etc/mail/genericstable')dnl
    GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')dnl
    MAILER(`local')dnl
    MAILER(`smtp')dnl
    LOCAL_NET_CONFIG
    R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
    compile...everything looks good
    /usr/lib/sendmail -bt
    ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
    Enter <ruleset> <address>
    /map generics rootmap_lookup: generics (root) returns [email protected] (0)
    /quitbut when I send out mail to root (mailx) FROM does not invoke the new value
    MAIL From:<[email protected]> SIZE=76
    250 2.5.0 Address and options OK.
    RCPT To:<[email protected]>
    Am I missing something ?
    Also notice that sendmail does not use the aliases db
    Is it necessary for the sendmail daemon to be running ?
    We just process saved messages /usr/lib/sendmail -q in crontab (outgoing only / no inbound mesages)
    thanks for any assistance

  • Mailx problem

    Hi.
    Maybe stupid but I can't send mail with mailx 8.1.1-2
    [root@host] pacman -Ql mailx
    mailx /etc/
    mailx /etc/mail.rc
    mailx /usr/
    mailx /usr/bin/
    mailx /usr/bin/mail
    mailx /usr/man/
    mailx /usr/man/man1/
    mailx /usr/man/man1/mail.1.gz
    mailx /usr/share/
    mailx /usr/share/misc/
    mailx /usr/share/misc/mail.help
    mailx /usr/share/misc/mail.tildehelp
    package is required when using cron, problem is that is seems not to be working without sendmail, should not be relying on it if not available I think.
    Output when trying to send mail
    mail -s test root@localhost
    testing
    EOT
    /usr/sbin/sendmail: No such file or directory:
    mail and mailx command seems to be different and did look at src dir when building the package and binary file is "mail" and not "mailx" which is missing on my system
    What is wrong here?
    /xor
    Arch Linux 0.7 (Wombat)
    Linux xor 2.6.7 #1 Sun Aug 8 20:39:05 CEST 2004 i686 unknown unknown GNU/Linux

    pacman -Qo /usr/sbin/sendmail
    /usr/sbin/sendmail is owned by postfix 2.1.4-1
    fire up that pacman with -S postfix

  • Send java mail throws KM - problems sendMail

    Hellow
    I implementing the Java send mail post in
    send mail throws NoClassDefFoundError: javax/mail/MessagingE
    But I have a little problem with the sentence:
    <b>sendMailSvc.sendMail(mailItem, iuser);</b>
    The stranger is that NetWeaver protests to me that:
    <i>The Method sendMail(IResource, IUser) in the type ISendMailService is not applicable for the arguments (ISendMailItems, IUser)</i>
    But in the class, NetWeaver showme sendMailSvc.(Ctrl+Space) two Method send mail
    1) sendMail(IResource arg0, IUser arg1)
    2) sendMail(ISendMailItem arg0, IUser arg1)
    Why it does not take the second method? I do not understand
    Regards !!

    Thanks Detlev for your answer
    I  import IUser from :
    <b>import com.sap.security.api.IUser;</b>
    and initialize the variable user :
    <b>     IWDClientUser user;
         IUser iuser = user.getSAPUser();</b>
    but you say to me that it would have to use:
    <b>import com.sapportals.portal.security.usermanagement.IUser;</b>
    how I can initialize the variable "user" for:?
    <i>ISendMailItem mailItem = null;
                   try {
                             mailItem = sendMailSvc.createMailItem();
                             mailItem.setContent("Test");
                             mailItem.setTo("[email protected]");
                             <b>sendMailSvc.sendMail(mailItem, user);</b></i>     
    Regards for your help !!!

Maybe you are looking for