Sponsored Content
Top Forums Programming Sendmail & mail.local + MySQL API Post 10404 by CGrusden19 on Tuesday 13th of November 2001 05:18:45 PM
Old 11-13-2001
Sweet!

Ok thanks for the reply, I have edited the sendmail.cf file's "Mlocal" + my mail program... I have my program written in C, and it delivers whatever I tell it to, to the tables within the MySQL database, however, I might be repeating myself, But could you steer me now into the direction of how to just get ALL the data into the C program from the STDIN, then I can move onto the next step... Reason is this, if I do:

scanf("%s %s %s %s",&From,&FromAddress,&To,&ToAddress);

It will only grab the "From:" (&From), "Blah@blah.com" (&FromAddress), "To:" (&To),"Blow@blow.com" (&ToAddress)..

I want to be able to stream EVERYTHING, or atleast when it comes time to get the WHOLE message into the database... Can you tell me what command or function to grab ALL of the STDIN? I tried using "gets(message)", but came up with Segmentation errors, and tried to debug it.. but i'm just coming up with a deadend..

-Corey
 

7 More Discussions You Might Find Interesting

1. Linux

local mail relay problem in Sendmail

I have a linux box. Sendmail is work fine in this box. The only problem I am facing is whenever I send mail using the mail command to the outside world or to root@localhost, I get this error - 127.0.0.1 localhost denied from relaying The command I used to send mail is - Ls -l | mail -s... (0 Replies)
Discussion started by: RajaRC
0 Replies

2. Programming

API C MYSQL vs lock table ???

(sorry for my english) Hi, i have an app that uses MYSQL API C.. i trying do a timeout until the table is locked by an other thread , in the docs of Mysql i can see that MYSQL_OPT_READ_TIMEOUT is not implemented for linux ¿?¿?.. any body knows a way to do a timeout until the table is locked by... (0 Replies)
Discussion started by: JEscola
0 Replies

3. Programming

Man pages for C API for MySql

Hi, I am on Ubuntu 9.04 tweaking some programs demanding MySql queries. I got the program working by installing following package: sudo apt-get install libmysqlclient-dev and using proper include and library folder However I was unable to access any man pages for these C api's (Strangely... (1 Reply)
Discussion started by: dheerajsuthar
1 Replies

4. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

5. UNIX for Dummies Questions & Answers

Minimal Mail Server Setup for Local Mail Transfer

I am trying to get stored mail out of an old mail client. I figured that the easiest way to do it is with IMAP by logging in with both clients. I can copy the mail to the server from the old mail client, and back down into the new mail client. Rather than using a real mail account on the... (2 Replies)
Discussion started by: nixie
2 Replies

6. SCO

Sendmail delivers mail to local user if it exists instead of passing it to the smart relay

Environment: SCO Unix Openserver 6 Sendmail ver: 8.11.3 I just put this server online replacing it's old counterpart, same OS on new machine. There are many different servers on this domain, windowssrv.thisdomain.com, oldunix.thisdomain.com, and the new newunix.thisdomain.com just to name a... (2 Replies)
Discussion started by: checkpro
2 Replies

7. Proxy Server

How to send mail (sendmail) for php mail()?

PHP mail() function doesn't work. Nor does sendmail: loaded system configuration file /etc/msmtprc ignoring user configuration file /home/xi/.msmtprc: No such file or directory falling back to default account using account default from /etc/msmtprc host = xsi port = 25 proxy host = (not... (1 Reply)
Discussion started by: Xcislav
1 Replies
MYSQL_ERRNO(3)								 1							    MYSQL_ERRNO(3)

mysql_errno - Returns the numerical value of the error message from previous MySQL operation

SYNOPSIS
Warning This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: omysqli_errno(3) o PDO::errorCode int mysql_errno ([resource $link_identifier = NULL]) DESCRIPTION
Returns the error number from the last MySQL function. Errors coming back from the MySQL database backend no longer issue warnings. Instead, use mysql_errno(3) to retrieve the error code. Note that this function only returns the error code from the most recently executed MySQL function (not including mysql_error(3) and mysql_errno(3)), so if you want to use it, make sure you check the value before calling another MySQL function. o $ link_identifier -The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect(3) is assumed. If no such link is found, it will try to create one as if mysql_connect(3) was called with no arguments. If no connection is found or established, an E_WARNING level error is generated. Returns the error number from the last MySQL function, or 0 (zero) if no error occurred. Example #1 mysql_errno(3) example <?php $link = mysql_connect("localhost", "mysql_user", "mysql_password"); if (!mysql_select_db("nonexistentdb", $link)) { echo mysql_errno($link) . ": " . mysql_error($link). " "; } mysql_select_db("kossu", $link); if (!mysql_query("SELECT * FROM nonexistenttable", $link)) { echo mysql_errno($link) . ": " . mysql_error($link) . " "; } ?> The above example will output something similar to: 1049: Unknown database 'nonexistentdb' 1146: Table 'kossu.nonexistenttable' doesn't exist mysql_error(3), MySQL error codes. PHP Documentation Group MYSQL_ERRNO(3)
All times are GMT -4. The time now is 04:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy